Skip to main content

Full text of "CBM 8-Bit Magazine Index: Compute's Gazette Special Section"

See other formats


serene = 


WORD 
POWER! 


WE TEST 5 FEATURE-PACKED 
WINDOWS WORD PROCESSORS 
PLUS! TOP 10 MACROS FOR 

~ WORDPERFECT FOR WINDOWS 
- WORD FOR WINDOWS 

_ WORDPERFECT FOR DOS 


MULTIMEDIA! — 

~ CUTTING-EDGE ENTERTAINMENT 
. SUPER PC SOUND 

.. INSTANT CD-ROM LIBRARY 
MORE HOT STUFF! 

_ CHARLES GIVENS EXCLUSIVE 

_ LANS AT HOME 

_ ONLINE GETS EASIER 


" PICK THE BEST LAPTOP-A BASIC GUE : 


ete tn ee eee a 


“Citizen's Notebook Printer. It also fits in your briefcase. 


Callahan knows that a successful business often uses teamwork to make the sale. So he goes where the customers 
are, and he makes points. His teammate is the Citizen Notebook Printer. It's an exercise in good business: 
laser-quality output, 2.5 pounds, rechargeable power. Anytime. Anyplace. 


For more information call 1-800-4-PRINTERS. 


Circle Reader Service Number 166 


64/128 VIEW 


Mad Man Software is a new company with 


a new adventure game for the 64. Its average 


playing time is between 200 and 400 hours. 


Tom Netsel 


he rat looked as big as 

a Volkswagen, and it 

was charging straight at 

our hero. Outrunning 
such a creature was impos- 
sible. His only chance was 
to stand and fight, a pitifully 
small sword his only weap- 
on. He drew it and took a 
swing at the rampaging ro- 
dent. Would the rat engulf 
him, or would his puny blow 
strike home? 

As we held our breaths 
awaiting the outcome, it 
took a minute before we re- 
alized that nothing had hap- 
pened. The rat was still 
there, our hero was still 
there, but the screen had fro- 
zen, Our first encounter with 
the game's first monster, 
and the program locked up. 
This was one of those embar- 
rassing moments that can oc- 
cur when a software repre- 
sentative demonstrates his 
company's latest product. 

Reboot. Try again. Same 
thing. Groan! | was feeling 
sorry for Gene Barker. He's 
a recent graduate from the 
Colorado School of Mines 
who'd flown to North Caroli- 
na from Colorado to show 
the Gazette staff Messiah III: 
Nemisis, an adventure 
game for the 64 that he's 
been developing for almost 
six years. Now, when the 
game's lead character aims 
his first blow at the very first 
monster, years of program- 
ming grind to a halt. 

Wait a minute! This 128 
has a defective SID chip, 
and the program relies on 
one of the computer's voic- 
es to generate random num- 
bers to help decide a bat- 
tle’s outcome. The pro- 
gram's in a loop, waiting for 
a random number to ap- 
pear, and that chip is as si- 
lent as Harpo Marx! We 


could be here until Godzilla 
comes home. Let's go 
down the hall and try anoth- 
er machine. 

As | said, when someone 
comes all this way to demon- 
strate a major new release 
for the 64, you want things 
to go well. After all, there's 
not exactly a flood of new ti- 
tles sweeping that market 
these days. In fact, it would 
take a madman to start a 
new company aimed at de- 
veloping software for that vet- 
eran market. And that's just 
what Barker and ten associ- 
ates have done. Their com- 
pany is called Mad Man Soft- 
ware (7610 West 5th Ave- 
nue, Suite 200, Lakewood, 
Colorado). For the past 
year, they've been polishing 
Barker's game, and 
Messiah III should be ready 
by this fall or Christmas. 

Messiah Ill is no light- 
weight arcade adventure, 
as we saw when we ran it 
on another machine. We 
were treated to a richly de- 


tailed adventure game 
that's the first of a six-game 
saga. Messiah Ill, which 


should sell for around $60, 
consists of more than one 
megabyte of code. That's 
six disk sides. Disk access 
times have been reduced, 
however, so that the longest 
load should take no more 
than 12 seconds. 

While we await the final 
version for review, Barker esti- 
mates the average playing 
time will take between 200 
and 400 hours. When many 
new games are measured 
in megabytes, Barker 
doesn't feel the 64's memo- 
ry constraints have placed 
limits on his creativity. “It’s 
the game's design which dic- 
tates its power,” he says, 
“not the machine.” a] 


GAZETTE 


64/128 VIEW G-1 


Anybody who'd start a new company based on a new 
adventure game for the 64 must be a madman, but 
that's just what Gene Barker and friends have done. 
By Tom Netsel. 


FEEDBACK 


Questions and comments from our readers. 


THE SMALLER, THE BETTER 


For large storage capacity in a small package, 
check out the 1581. It's the great big drive 

in the little beige box. 

By George Gunn. 


REVIEWS 
Chip's Challenge, Perfect Print, Predator 2. 


BEGINNER BASIC G-18 


Joystick ports usually handle input devices, but 
here's a way to reverse the data flow. 
By Larry Cotton. 


MACHINE LANGUAGE 


The stack works so well by itself that many 
programmers simply ignore it. 
By Jim Butterfield. 


GEOS 


Check out deskTop alternatives. 
By Steve Vander Ark. 


D’IVERSIONS G-24 


Can multimedia be a springboard to immortality? 
By Fred D'Ignazio. 


G-2 


G-4 


G-12 


G-20 


G-22 


PROGRAMS 

Pop-Up G-25 
Mimic 128 G-28 
SpeedPurge G-29 
Alphabetizer G-30 
Duplicate 1541 G-31 
Railroad Solitaire G-32 
128 Graphic Dump G-34 
Quiz Wiz G-35 
MLX G-38 


JULY 1992 COMPUTE 


GA 


answers about time, 


word processors, 


modems, programming 
languages, and MIDI 


G-2 


COMPUTE JULY 1992 


FEEDBACK 


INPUT Time 

Is there a way to change the 
value of TIS by using an IN- 
PUT statement from within a 
BASIC program? 

KARL ROSEMANN 

DENVER, CO 


Try the following line in your 
program. It should do the 
trick nicely. 


10 INPUT “NEW TIME”; TI$ 


When the program runs and 
you see the INPUT prompt, en- 
ter your response with six dig- 
its in an HHMMSS format. HH 
equals hours, MM equals min- 
utes, and SS equals seconds. 
For example, 123456 will set 
TI$ to read 12:34:56. If you en- 
ter more or fewer digits, you'll 
get an ILLEGAL QUANTITY 
message. If the number is 
greater than 23:59:59, the 
clock resets to 00:00:00. 


Bug-Swatter 
The ending address of File 
Lord (May 1992) is incorrect. 
The correct address is 14C0. 
This affects MLX only and not 
the File Lord program. We pre- 
pared the listing after the doc- 
umentation, and it was then 
that we noticed how long the 
program was. To make it eas- 
ier to type in, we compressed 
the program with Mega- 
Squeeze but neglected to 
change the ending address. 
The compression program 
may have affected the way 
the program starts. If you 
type RUN and get a READY 
message, simply type RUN 
again, and File Lord should 
start. The program on Ga- 
zette Disk wasn't affected. 


80-Column Word Processor 
Is there a word processor for 
the 64 that has a true 80-col- 
umn screen? | am looking for 
one that's like the 128 or IBM, 
not a 40-column screen such 
as GEOS, which scrolls to re- 
veal 80 columns. | am not look- 


ing for one that simply has a 
preview screen either. Is 
there one that exists with this 
feature? 


JON PERSINGER 
INDIANAPOLIS, IN 


You might try Script 64, pub- 
lished by Richvale Telecommu- 
nications of Canada. To the 
best of my knowledge, howev- 
er, that company is no longer 
in business. You might locate 
a used copy of the program 
for about $9 at Bare Bones 
Software, 940 4th Avenue, 
Suite 222, Huntington, West 
Virginia 25701, (800) 638- 
1123. Call or write for a free 
catalogue of used 64 and 
128 software. They also carry 
Amiga products. Supplies are 
limited, so check with the com- 
pany before ordering. 


Modem Woes 

| have a 64 with an Aprotek 
12C modem used as a Volks 
6480. | would like to play mo- 
dem games with a friend, but 
| need the originate and an- 
swer codes that will corre- 
spond with my friend's Com- 
modore 1670 modem. | can't 
find this information in the man- 
ual. Can you supply me with 
these codes? 


MARTIN BOUTIN 
LONGUEUIL, PQ. 
CANADA 


Your modem, which can be 
used as a Volks 6480, is no 
longer in production, but you 
should have no problem us- 
ing it to connect with your 
friend. It requires no special 
originate or answer codes or 
settings. It's Hayes compati- 
ble in that it supports automat- 
ic answering (ATA) and auto- 
matic dialing (ATDT) com- 
mands, just as your friend's 
1670 does. You should be 
able to contact each other 
just as easily as you can con- 
nect with a local BBS. 

Check the terminal or 
game software you're using 


for requirements specific to 
that program. It may require 
manual dialing or answering. 
Also check the echo or du- 
plex modes to make sure you 
both can see what each of 
you is typing. If you still think 
the modem is at fault, call 
Aprotek’s service department 
at (503) 582-2118 from 8:00 
a.m. to 4:30 p.m. Pacific time 
on weekdays. 


Pascal Wanted 

| am currently taking a 
course in Pascal at high 
school, using Turbo Pascal 
on a Macintosh. | have a 64 
at home, and | would like to 
use Pascal with it. Is there 
such a compiler and where 
can | obtain it? 


MIKE SMITH 
CRYSTAL, MN 


Contact Abacus, 5370 52nd 
Street SE, Grand Rapids, Mich- 
igan; (800) 451-4319, and 
ask about Super Pascal 64 
($19.95). It implements the 
full Jensen & Wirth compiler 
plus extensions for graphics. 
It has a complete source file 
editor, a full assembler, and a 
utility package. 


MIDI Info 
| am interested in music and 
would like to get into MIDI. Is 
there a MIDI system available 
for the 64? 


EDNA WILLIAMS 
BRIDGEPORT, CT 


Contact Dr. T’s Music Soft- 
ware, 100 Crescent Road, 
Needham, Massachusetts 
02194; (617) 455-1454, and 
ask for its free catalog of 
MIDI hardware and software. 
Dr. T offers a 64 MIDI starter 
pack that includes its Key- 
board Controlled Sequencer, 
a MIDI interface, and two 
MIDI cables for $180. A ver- 
sion for the 128 retails for 
$275. You'll have to supply 
your own MIDI keyboard or 
other MIDI instrument. o 


Amiga 500 Com 


Basic Package 


TENEX Super Graphics Pack 


:X Power Pack Amiga 500 Basic Packoge 
Plus 3 Great Value Packages! TNE Amiga 500 Basic Package sees 10845 Stereo Monitor 
Software Bundle cal : “software Bundle #1 
TENEX Bonus Pack ‘Software Bundle #2 & Joystick “goftwore Bundle #2 & Joystick 
# Amiga 500 Basic Package *1V Adapter STENEX 500 Memory Expansion 
‘Software Bundle #1 TENEX 800 Memory Expansion ie 
ter ; . 
TV Adapt $454.75 Total at Reg. Price nice $669.00 
$364.85 Low TENEX Package Pric 
Total at Reg. Price $54.80 More! 


Total at Reg. Price 95 Sav 
ow TENEX Package Price $377: bee 

Low TENEX Package Price ei pave Te You Save $70.75 More! 

You Save 


Commodore 64 


Commodore-Ready Printer 
Jrom Star 
At An Incredible Price! 


$] 19” 


NX-1000C, 
E euneor etter Quality at 36 cps and high- 
Paper Sones anaien ae ee i Be 
front panel controls, | deencaltall 
. Includes four built-i RE 
fonts and over 20 typestyles, This Eat - as | Cone eas : 


Commodore-read\ i i 
Just plug it in and de TSION of the NX-1000. j i 
tional interfaces or Soe eS adc OTHER STAR PRINTERS Dik DIMg 


z . Sug. Retail 
NX-1000C Printer 73060 al PEED NX-1001 Multi-Font 90895 Onl 
Ribbon (NX SPECIAL! $119.95 | NX-2420 Rainbow ps0 35 7 
Ribbon (NX-1000C) 75471 $5.95 NX-1020 Rainbow A21047 $284.95 $ 95 
77789 $8.95 LaserPrinter 4 tenes ee 169 
.00 


Don’t miss out on the lowest prices on 
the Amiga 500, plus a full line of 
Commodore and Amiga hardware, 
software, and accessories. 

Call today to receive your FREE 
catalog with the greatest prices on the 
most popular hardware and software! 


Shipping, Handling, Insurance 
Order Amount Charge 
less than $19.99 $4.95 
$20.00-$39.99 $5.95 
$40.00-$74.99 $6.95 
srs onsee 7 $7.95 
= = Beads 100.00-$149.99 $9.95, 
Co pilter f ©; $150.00-$299.99 $10.95 
] Japs ; Be = $300.00-$499.00 $12.95 
: 2 $500.00-$699.99 $19.95 


‘der $700.00-$999.99 $27.95 


R, THE 


fee 
ed 
aaa | 
a 
ier 
Fe 
== 
[eae 


FOR GREATER STORAGE CAPACITY IN A 
SMALLER PACKAGE, THE 1581 IS 
THE BIG DRIVE IN THE LITTLE BEIGE BOX. 


BY GEORGE GUNN 


he 1581 drive is a great piece of 

hardware for anyone who owns 

a 64 or 128, and it's also compat- 

ible with Plus/4, Commodore 16, 
and VIC 20. The 1581 is smaller than ei- 
ther the 1541 or 1571, yet it stores 
much more data on its disks. The 
1581's 3¥%-inch disk holds nearly a 
megabyte of information (808,960 
bytes). After formatting, 3,160 blocks 
are available to the user, with 40 
blocks reserved for the disk's main di- 
rectory. On a 1541, this would be equiv- 
alent to 4% floppies, each with 664 
available blocks! 

Having all this space makes it pos- 
sible to store a huge number of files on 
one disk, but the directory scrolls off 
the screen if you have more than 22 
files. This can make file management 
particularly difficult. 

For this reason, the 1581 has a fea- 
ture known as partitions. A partition is 
a space on a disk which the user sets 
aside for special use. For all intents 
and purposes, each partition is seen 
by the computer as a separate disk. 
Within the limits of certain parameters, 
you can create numerous partitions on 
each disk, with each partition contain- 
ing whatever files you wish. Each par- 
tition can also have its own directory. 
You can even store files with the same 
filename on the same disk, because 
the computer thinks each partition is a 
separate disk drive. 


Logical Disk Organization 

When creating partitions, it's helpful to 
remember the 1581's logical disk organ- 
ization. Although each 1581 disk is 
double-sided, the computer sees it as 
single-sided, with 80 tracks per disk 
(numbered 1-80) and 40 sectors (or 
blocks) per track (numbered 0-39). 

It might be helpful to think of a for- 
matted disk as consisting of a series of 
concentric circles. Each circle is a 
track, and each track is divided into sev- 
eral sectors. 

Each partition must consist of one or 
more complete tracks; thus, a partition 
must be a multiple of 40 sectors in 
length and must begin on sector 0 of a 
given track. Remember that track 40 is 
reserved for the disk's main directory, 
so tracks 1-39 are available for partition- 
ing, as are tracks 41-80. A partition 
may not include or pass over track 40. 


Creating Partitions 

The commands for creating partitions 
described in the 1581 user's guide are 
unwieldy and difficult to understand. Of 
greater help is the Partition Aid pro- 
gram on the demo disk that’s supplied 
with the drive. Through a series of 
screens and prompts, this program 
asks for the partition name, beginning 


G-6 COMPUTE JULY 1992 


track and sector, and total number of 
blocks you want in the partition. Sup- 
pose you want to create a partition 
called Arcade Games and set aside 
600 blocks for it. After loading and run- 
ning Partition Aid on the demo disk, 
you'd be presented with a screen that 
lists the following options. 


1. SHOW PARTITIONS 
2. CREATE PARTITIONS 
3. DIRECTORY 

4, CHANGE UNIT 

5. QUIT 


Since we don't have any partitions at 
this time, you'd skip the first choice. 
Choosing option 2 would take you to 
the next screen called Create a Parti- 
tion. Here you'd see the following in- 
structions on your screen. 


MODIFYING SPEEDSCRIPT 


Most people set their 1541 or 1571 as 
drive 8 and designate the 1581 as drive 
9. If you use SpeedScript, which normal- 
ly uses drive 8, there was formerly no 
easy way to save your files to drive 9 and 
use the 1581 as the data storage device. 
Now there’s a way to alter the pro- 
gram to access drive 9 instead. This will 
let you load SpeedScript from a 1541 or 
1571 and save data to the 1581. Of 
course, since SpeedScript is fairly 
small, you can save this modified version 
to the 1581 and direct all of its disk com- 
mands to drive 9. To accomplish this, 
load a copy of SpeedScript into memory, 
but don't run it. Then enter the following 
two lines below in immediate mode. 


POKE 4843,9: POKE 4908,9: POKE 5274,9: 
POKE 5873,9: POKE 5967,9 

POKE 6367,9: POKE 6883,9: POKE 7003,9: 
POKE 7073,9 


Then save the modified program to. 
disk using a unique filename, such as 
SPEEDSCRIPT9. All disk commands will 
now access device number 9. You won't 
be able to switch at will between drive 8 
and drive 9 from within SpeedScript, but 
you can choose to work from whichever 
version of SpeedScript you wish. If you 
try to alter such a program, however, be 
sure you don't alter your only copy of it. 
Make a backup copy first. 

Of course, you must set the switches 
on the back of your 1581 to the proper 
combination. If both of your drives are 
set to the same device number, your sys- 
tem will lock up. 

To set the drive number, turn off your 
4581's power and look at the drive from 
the rear. To set it for drive 8, push both 
switches to the up position. To set it for 
drive 9, pull the left switch down and 
push the right switch up. To set the 1581 
to drive 10, set the left switch up and the 
right one down. Pull both switches to the 
down position to set it for drive 11. 


TO CREATE A SUBDIRECTORY YOUR 
PARTITION MUST 

(1) START ON SECTOR 0 

(2) BE AT LEAST 120 BLOCKS 

(3) BE A MULTIPLE OF 40 BLOCKS 


At the prompt Enter a partition name, 
you would enter Arcade games. 

Next, you're prompted for the begin- 
ning track. Since track 40 is reserved 
for the disk’s directory, it may not be 
used. The partition may begin on any 
other track on the disk. This prompt ap- 
pears onscreen as follows. 


FIRST TRACK (1-39 or 41-80) 
2 


We'll begin this partition on the first 
track of the disk, so we should enter 
the number 1. Next, you're prompted 
for the first sector. 


FIRST SECTOR (0-39) 
2 


For practically all purposes this would 
be 0, so enter O at the prompt. 

Finally, you're prompted for the num- 
ber of blocks you want in the partition. 
This must be a minimum of 120 and a 
multiple of 40. 


NUMBER OF BLOCKS IN PARTITION 
? 


We're making a partition of 600 blocks 
(which, by the way, covers 15 tracks 
since 600/40=15), so at this prompt we 
enter the number 600. 

After this last prompt, all the neces- 
sary information has been gathered, 
and we're taken to a third screen, bear- 
ing the title Create a Partition. At the 
top of the screen we see the following 
message. 


CREATING PARTITION: ARCADE 
GAMES STATUS: 0 OK 0 0 


Next, we're asked if we want to make 
a subdirectory for this partition. For 
most uses, you'll need a subdirectory, 
so at the prompt type Yes. 

This brings up another prompt ask- 
ing for a directory name. Here you 
should type the Partition Name Arcade 
games. 

Finally we are prompted for the famil- 
iar two-character alphanumeric ID, 
well known to users of CBM BASIC. 
Let's number this partition 01. 

From this prompt, the drive checks 
its status and tells us to press a key to 
continue. 

We're then returned to the opening 
screen, where we may exit by pressing 
number 5. At this point we have 
placed a partition of 600 blocks on 


CUST SERVICE/TECH SUPPORT 
RI O 800-782-9 1 1 0 ORDERS AUTOMATIC VOICE/FAX SWITCH 
ONLY 702-454-7700 


COMPUTERS MON-SAT 8AM-6PM PACIFIC TIME TUE-SAT 1PM-5PM PACIFIC TIME 


VIDEOFOX VIDEO DIGITIZER 


The Tool For Creative Video Buffs Digitize black and white or color pictures 


si a A . z @ Digitize any video source including VCR 
Generate video titles, opening credits, window 


@ Digitize either 4, 7 or 13 level grey levels 
advertising, animation or other small trick movies 


@ Menu controled picture brightnes 
a S i software programs 
All of these exciting effects are are easy and fun for you to do with inc ides three sade pen deny sot Ware pre 
our new Videofox software 


for total control and editing of digitized images: 
‘ . 4 Ae; ~ i ~ DIGIMULTI 

™@ Provides 18 special effects such as scrolling, combing, winshield DIGS ONG DICHOS 

wiper and spiral mixing 


@ Free color filters included for digitizing color 
@ Mix text, graphics and effecs to produce hundreds of combinations Ree ee eae ere for each 
@ Independent adjustment of foreground and background colors 

@ Page flipping in real time for perfect animation sequences 


of the red - green - blue primary colors 
ONLY $59.95 


HANDYSCANNER 64 


f ONLY $249.95 
The Worlds First Handscanner for the 64! 


@ Professional quality super high 400 dots per inch resolution ~ Reads the graphics from any printed document 

@ Converts any material to digitized graphics in seconds ~ B/W setting for crisp reprodution of high contrast line art 
@ Elaborate grey-tone scale digitizes color or black & white photos using 3 built in dithering settings 

WEnlarge or reduce 300% to 33% ~ Graphic memory of 640 X 400 standard (640 X 800 with Pagefox module) 

® Included software has all the standard functions of a good drawing program 


ONLY $299.95 


PA GEFOX 3 Easy To Use Editors For Perfect 
Home Desktop Publishing 
GRAPHIC EDITOR ~ TEXT EDITOR ~ LAYOUT EDITOR 


@ Completely menu driven 
@ 100Kb storage enlargement module keeps entire page in memory 
@ Uses proportional mouse or joystick for total control over text, graphics or picture 


ONLY $139.95 Ee ee 


| 
Say rea s 


ACTION REPLAY V 6.0 


THE ULTIMATE UTILITY/BACKUP CARTRIDGE FOR THE C64/128 
Allows You To Freeze The Action Of Any Memory Resident Program And Make A Complete Backup To Disk 


WARP 25 - The worlds fastest disk serial Turbo MORE UNIQUE FEATURES - Menu driven operation 
® Typical backup will reload in under 5 seconds @ Simple operation: Just press a button at any point 

No special formats-save directly into Warp mode MH All backups reload WITHOUT cartridge at Warp speed 
@ Warp Save/Load available straight from BASIC MM Sprite killer; Make yourself invincible-disable collisions 
RAMLOADER - Loads most commercial originals Ml Freeze HiRez screen & save in Koala & Paddles format 


25 times faster than normal! @ Print out any screen in 16 grey scales 
UNIQUE CODE CRACKER MONITOR - @ 100% compatible with ALL drives and computers 
@ Full monitor features @ Disk utilities: fast format, directory, list and many other 
@ See the code in its Frozen state not Reset state commands operated directly from function keys 
H MIDI 64 -Only $49.99 ADV. MUSIC SYSTEM MAKE THE MOST OF YOUR 
Full specification MIDI at a realistic price Powerful modular program for creating, editing, 
MIDI In - MIDI Out - MIDI Thru playing and printing out music ACTION REELAY 
@ Works with Sampler and Adv. Music System @ Playback thru internal sound or external MIDI GRAPHICS SUPPORT DISK 


MIDI CABLES (4 ft. prof. quality) -Only $*8.99 keyboard/synthesiser 


FREE cables when you buy MIDI & ADV. MUSIC at same time ll Print music in proper musical notation together View screens in a slide show sequence 


@ Add scrolling messages to your saved screens 


with lyrics using PRINTER module ; ‘ * 
DIGITAL SOUND SAMPLER  menermusc anoteatatimeinwrten misic Ml niodes seers of saved srenst fl size 
Only 2 $89.99 format using the EDITOR or via on screen pies Onl 1 5 ‘ 
THE ADVANCED piano KEYBOARD emulator or via an nly - $19.99 
externally connected MIDI keyboard 
OCP ART STUDIO @ Generate almost unlimited sounds with the SUPERCRUNCHER - ony $9.99 
flexible SYNTHESIZER module Turn your Action Replay into a su ful 
COMPREHENSIVE, USER FRIENDLY ART BLi we ee y play per powertu’ 
AND DESIGN SOFTWARE Linker joins files to form large compositions program compactor. Reduce programs by up to 
50%! Further compact progrms already crunched 
Only a $29.99 Only = $29.99 by Action Replays compactor 


RIO COMPUTERS 44486.00 shipping/nandiing in the continental U.S.: $8.00 - PR, AK, Hl, FPO, APO: $11.00-Canada: Other 800-782-91 1 0 


foreign orders call or write for shipping charges: C.0.D. orders add $5.00 to above charges: SPECIFIY 
3310 BERWYCK STREET COMPUTER MODEL WITH ORDER: VISAIMC/Checks/Money OrdersiC.0.D. Accepted: Please call for 702-454-7700 
urn authorization number or your package wil refused - returns maj subject to a 20% restockin, ms Ss 
LAS VEGAS, NV 89121 fee after 15 days: Prices subject to change without notice. y ; 2 INNEVADA 


Circle Reader Service Number 205 


tracks 1 through 15 of the disk. The 
first track of this partition will be re- 
served for the partition’s own directory. 
On the disk’s main (root) directory, the 
partition will show up as the following. 


600 “ARCADE GAMES” CBM 
Partition from BASIC 


The series of prompts in this program 
makes the process very easy. Of 
course, you can create partitions from 
BASIC if you can decipher the follow- 
ing code given in the user’s manual. 


PRINT#file#, ‘/O:partition name,” + 
CHRS(starting track)+ CHR$(starting sector)+ 
CHRS(< # of sectors)+ CHR$(> # of sectors)+ 
“ Q” 


Especially confusing are the expres- 
sions < # of sectors and > # of sectors. 
Evidently a misprint in the book has 
placed these two expressions in re- 
verse order. After much experimenta- 
tion, I’ve found that they essentially re- 
fer to the range of sectors contained in 
the partition. The expression < # of sec- 
tors should refer to the high number of 
this range (600 in our example above), 
and > # of sectors should refer to the 
bottom of this range (0 in our exam- 
ple). However, since a CHR$ value 
may fall only within the range of 0-254, 
any partitions of more than 254 sectors 
have to use an adjusted value. 

The > and < signs actually refer to 
the high byte and low byte for a given 
expression. There's a way to calculate 
values for partitions greater than 254 
sectors. If N equals the number of sec- 
tors for a partition, the high byte would 
be represented by INT(N/256). The low 
byte would be represented by N-(low 
byte)*256. Thus, for our partition of 
600, the high byte is INT(600/256) = 2. 
The low byte is 600-2*256 = 88. So, to 
create our partition of 600 blocks, we'd 
issue the following commands. 


OPEN 15,8,15 
PRINT#15, “/0:ARCADE GAMES,”+ CHR$(1)+ 
CHRS$(0)+ CHR$(88)+ CHRS$(2)+ ‘,C” 


CHR$(1) refers to the starting track of 
1. CHR$(0) refers to the partition's be- 
ginning sector in track 1. CHR$(88) re- 
fers to the 600 block partition’s low 
byte. CHR$(2) refers to the 600 block 
partition’s high byte. 


Another Format 

At this point the required blocks have 
been set aside as a partition, but the 
partition can't be used yet. It has to be 
formatted before you can store files in 
it even though the disk itself has al- 
ready been formatted. This creates a 
partition directory (or subdirectory) on 


G-8 COMPUTE JULY 1992 


the first track of the partition. So, with 
the disk still in the drive, the new parti- 
tion is selected by the following line. 


PRINT#15, ‘‘/0:ARCADE GAMES” 

Then the NEW or HEADER commands 
are used to format this partition area. En- 
ter the following line. 


PRINT#15,‘‘NO:ARCADE GAMES,01”: 
CLOSE15 


CARTRIDGES 

In addition to holding more information, 
the 1581 loads programs significantly fast- 
er than the 1541 or 1571. Because of a 
slightly different DOS than that used ina 
1541, the 1581 isn’t compatible with 
some fast load cartridges. | use the 
Epyx Fast Load Cartridge with my 1541, 
but it has to be disabled before | use the 
1581. There are a couple of fast load pro- 
grams for the 1581, and these work 
quite well. 

Recently, | bought a Super Snap- 
shot cartridge, after reading that it was 
compatible with the 1581 drive. After us- 
ing it for a while, I'm very impressed 
with the performance of this cartridge. 
Most of its features work quite well with 
the 1581. The only shortcoming I've 
found is that its file utility isn’t able to 
scratch a file from within a partition. 


The partition is now ready to be 
used. We've done in BASIC what the 
Partition Aid program did for us 
through a series of easy-to-understand 
prompts. Files in the partition may now 
be written to, read from, scratched, re- 
named, and so on. 

If you're interested in constructing 
your partitions from BASIC rather than 
using Partition Aid, the following table 
may prove useful. Consult it for a list of 
the high byte and low byte values of 
the given numbers of sectors. 


No. of High Low 
Sectors Byte Byte 
120 120 io} 
160 160 0 
200 200 0 
240 240 0 
280 24 1 
320 64 1 
360 104 1 
400 144 1 
440 184 1 
480 224 1 
520 8 2 
560 48 2 
600 88 2 
640 128 P34 
680 168 2 
720 208 2 
760 248 2 


Partition Management 

Now that you have partitions on your 
disk, how do you make practical use of 
them? One of the more useful purpos- 
es for partitions is grouping similar 
files. For example, on my SpeedScript 
word processing disk, I've set up one 
Partition for the word processor itself. | 
have SpeedScript's accompanying pro- 
grams and utilities (mail merge, 80- 
column preview, right margin justified, 
columns, and so on) in a partition locat- 
ed at tracks 1-8 (320 blocks). In ad- 
dition, | have made three other parti- 
tions out of tracks 9-39 for holding 
document files. | call. these DOCU- 
MENTS1 (tracks 9-19), DOCUMENTS2 
(tracks 20-29), and DOCUMENTS3 
(tracks 30-39) 

In each partition, the first track is re- 
served for a directory of that partition; 
the rest of the tracks are available for 
files. This partition directory doesn't 
show up when the disk’'s main (or root) 
directory is listed. After the partition 
has been selected, the computer 
treats that partition as if it were a disk 
in itself, and its own directory may be 
listed. On the disk's main directory, par- 
tition names are listed like other files, 
but the three-letter code (PRG, USR, 
SEQ) for a partition is CBM. Thus, on 
the word processor disk | described 
above, the disk’s main directory looks 
like the following. 


320 “SPEEDSCRIPT” CBM 
400 “DOCUMENTS1” CBM 
360 “DOCUMENTS2” CBM 
360 “DOCUMENTS3” CBM 
5 “CHANGE UNIT” PRG 


51 "1581 FAST LOADER” PRG 
1 “1581 PATH” PRG 
1255 \CORY.SIi PRG 
1651 BLOCKS FREE 


The first four items are my partitions, 
the next four items are utilities | com- 
monly use with the 1581 drive that are 
stored on the unpartitioned part of the 
disk, and the last item lists the blocks 
still available. 


Partition Selection 

Once the disk is inserted in the drive, 
a partition can be selected from BA- 
SIC. The syntax for selecting a partition 
follows. 


OPEN 15,8,15,‘‘/O:partition name” 


Of course, if you're using the 1581 as 
device 9, you should substitute the num- 
ber 9 for the 8 in this statement. Once 
the partition has been selected, you sim- 
ply work with it as if it were a separate 
disk of its own, loading, saving, verify- 
ing, validating, and so on. All of these 
commands affect only the selected par- 


INTRODUCING 


COMPUTE of NET 


@ About COMPUTE/NET 
@ Product Ordering 

@ Feedback Board 

® Coming Events 
@ Monthly Contest 


FIND US ON Q-LINK 


Welcome to the grand opening of 
COMPUTE/NET. A wealth of 
information awaits you, Back issues 
of COMPUTE, hard-to-find computer 
books, super software, dazzling 
pictures, challenging games, prizes, 
a complete bulletin board, and 
much more are here, You can even 
talk to the editors and authors of the 
magazine. Lots of surprises are 
planned, so keep your eyes on us. 


FREE Q-LINK STARTER KIT. 
FREE TIME. ORDER TODAY! 


Just call our toll-free number or 
return the coupon, and we'll send 
you the Q-Link Starter Kit and 
software free, waive your first 
month's membership fee, and credit 
you with one hour of "Plus" time to 
try the service. Your $9.95 monthly 
fee gives you unlimited access to 
all of our "Basic" services online, 
including a searchable encyclope- 
dia, AND one free*hour of "Pius" 
services. After your free hour, 
you'll pay only $4.80/hour-just 8 
cents per minute—for additional use 
of the service. 


Q-Link is a registered service mark of 
Quantum Computer Services, Inc. 


*Long-distance charges may apply. 
Surcharges apply if you are a resident of 
Alaska, Hawaii, or Canada. Allow four to 
six weeks for delivery. 


Call 1-800-782-2278, Ext. 2414 today 


O YES! Send me my FREE Q-Link software, waive my 
first month's membership fee, and credit me with one 
FREE* hour of Plus time to explore the service and try 
COMPUTE/NET. 


Name 
Address. 
City 


Home Phone 


MAIL TO 


8619 Westwood Center Drive 
Vienna, Virginia 22182-9897 


Use of Q-Link requires a VISA, 
MasterCard, or checking account. 


tition, not the rest of the disk. 

With the 64, all of the familiar BASIC 
2 commands, NEW, COPY, RENAME, 
SCRATCH, INITIALIZE, and VALI- 
DATE, which work with the 1541 drive, 
work with the 1581. If you have a 128, 
use the BASIC 7.0 commands as with 
the 1571. A partition’s directory may al- 
so be listed from within the partition 
with the standard LOAD “$”,8: LIST. 

Rather than using BASIC, | prefer us- 
ing 1581 Path, a short machine lan- 
guage program that appeared in the 
June 1990 Gazette. This one-block pro- 
gram offers a simplified syntax for se- 
lecting partitions, loading programs, 
and moving between partitions. 

From within your word processor, it's 
usually quite easy to move from parti- 
tion to partition. Most word processors 
have a command for accessing the 
disk drive. In SpeedScript, the 
keypress sequence is Ctrl-A. After press- 
ing these keys you simply type /parti- 
tion name and hit Return. If you need 
to go to the disk's main directory, en- 
ter Ctrl-A, simply type /, and press Re- 
turn. This should result in the message 
02, partition selected. 


Using Different Device Numbers 

A potential software problem involves 
programs that routinely access drive 8. 
If you're using the 1581 as drive 9, 


you'll encounter problems. If you're fa- 
miliar with machine language monitors 
or disk sector editors, you may be able 
to modify such programs to work from 
drive 9. Most programs use the follow- 
ing six-byte combination to open a 
disk file. 


AQ 02 A2 08 AO 02 


These bytes are the same as the BA- 
SIC command OPEN 2,8,2. To access 
other drives in BASIC, substitute the 
new drive number instead of using 8. 
The most recently accessed drive num- 
ber is stored in memory location 186. 
In machine language, therefore, 
you'd change the A2 08 to A2 BA so 
the program would load its files from 
the drive from which you booted it. 


Utilities for the 1581 
In addition to 1581 Path, which I've al- 
ready mentioned, the utilities that 
come on the demo disk supplied with 
the 1581 are very good. Also, | have 
found several Gazette programs worth- 
while additions to my 1581 library. 
Check out 1581 FastLoader (Janu- 
ary 1990). This program provides high- 
speed data transfers that are up to 
nine times faster than the standard Ker- 
nal load routine. It works with both the 
64 and 128 and allows you to relocate 


the program to nearly any memory lo- 
cation and to create autoboot files. 

Copy 81 (November 1989) allows 
you to copy any BASIC or machine lan- 
guage file from the root or a partition of 
one disk to the root or a partition of an- 
other disk. It also lets you copy files 
from the root or partition of one disk to 
another partition on the same disk. 

Another helpful program is 1581 Di- 
rectory Sorter (July 1989). It sorts your 
directory entries in both alphabetical 
and reverse alphabetical order. It also 
allows you to arrange files manually in 
any order you want. This utility has the 
ability to detect whether it's running on 
a 64 or 128 and whether the 128 is in 
40- or 80-column mode. In 128 mode, 
the program uses fast mode whenever 
possible. Unfortunately, this program 
works only on the disk’s main directo- 
ry, not on a partition’s directory. 

Allin all, | highly recommend the 
1581 drive to all 64 and 128 users. Its 
speed and storage capacity are im- 
mense improvements over the 1541 
drive and, to a lesser extent, over the 
1571 drive. Rigid-shelled 3%-inch 
disks are easier to handle and store 
than vulnerable 5¥%-inch floppies. O 


George Gunn is a Commodore owner 
who lives in Redding, California. 


THATS WHY YHey ; 
PUT ERASERS f 
ON PENCILS + 


G-10 COMPUTE JULY 1992 


PUMP UP 


YOUR PRODUCTIVITY! 


Harness the potential of your, The Carete Gne 


rab 
64 and 128 with these 2 it Soneae 
powertul programs. 


graphics! 
Here's what's on it- 
Get more work out of your 64 and 128 Se eee 
with these two new disk products from 
COMPUTE's Gazette — the 1992 
Best of Gazette Utilities, and 


128 Graphics Compactor, 
64 Animator, VDC Graphics, 
Dissolve 128, Super Slideshow, 


; 128 Animator, 1526 PriggScreen, 
the Gazette Graphics Grab Supratechnic, Medium itsolution 
Bag! Graphics, Screen Maker’ GAS!64— 


The 1992 Best of Special Edition, GAS!128—Special 
efens Edition. 

Gazette Utilities 3 

Seize control of your operating 

system and your world! 


Here's what's on it-MetaBASIC 64, 
MetaBASIC 128, Quick, Sprint II, 
Ultrafont+, RAMDisk 64, RAMDisk 128, 
BASSEM, SciCalc 64, List Formatter, 
MegaSqueeze. 


=] SSS 6 SS = SS SS SS S2. SS SS SS SS SS SS SS ES 


___Check or Money Order _ MasterCard _ _ VISA 
| want to pump up my productivity! Please send me the 
@ disks checked below at $11.95 each. Credit Card No. Exp. Date 


Signature 
| __The 1992 Best of Gazette Utilities a (Required) 
_—— The Gazette Graphics Grab Bag Daytime Telephone No. | 
__ Subtotal Neva | 
_— Sales Tax (Residents of NC and NY please add appropriate sales tax for your | 
area. Canadian orders, add 7% goods and services tax.) Address 


_—— Shipping and Handling ($2.00 U.S. and Canada, $3.00 surface mail, $5.00 City 
airmail per disk.) 


—— Total Enclosed State/Province ZIP/Postal Code 


| 
| A Mail this coupon to COMPUTE's 1991 Utilities, 324 West Wendover Ave., Ste. 200, 
L MasterCard and VISA accepted on orders with subtotal over $20. Greensboro, NC 27408. 


REVIEWS 


CHIP’S 
CHALLENGE 


If you love puzzles, then 
Chip’s Challenge from Epyx 
is for you, As the game be- 
gins, Chip MacCallahan, a re- 
al nerd, finds out he may be 
able to join his beloved Me- 
inda’s computer club, the 
Bit Busters. However, 
there's a catch to this offer. 
He must first complete 144 
levels of a maze-like puzzle 
before he can attain the high- 
est membership privilege of 
this very exclusive club. 
That privilege is to be near 
Melinda, of course!) Your 
job is to help Chip complete 
these levels so he can be 
close to the love of his life. 

The first few levels of 
Chip’s Challenge are easy. 
But don’t be fooled; the 
game gets more challeng- 
ing as you progress to the 
higher levels. Each level is 
slightly more difficult than 
the previous one, but you 
have more than one chance 
to pass a level. For exam- 
ple, if you get killed by a 
monster, then you get to try 
that level again. 

Some levels provide hints 
on what to do; others don’t. 
From time to time you'll en- 
counter levels that seem im- 
possible to pass. Don’t lose 
sleep over this, though. Af- 
ter several tries, the game 
gives you the option of con- 
tinuing at this level or going 
to the next. It's best to avoid 
both of these options, howev- 
er. Since scores are based 
on what level you reach and 
how quickly you pass to the 
next level of play, restarting 
or not completing a level on- 
ly lowers your score. 

If you exit the game for 
any reason, you don’t have 
to start at the first level. Just 
remember the code for the 
level you reached, and you 
can start again at that point. 


G-12 COMPUTE JULY 1992 


Each level has different 
types of puzzles to solve. 
No matter what obstacles 
you encounter, you must 
pass through a blinking exit 
to go to the next level. You 
may have to find your way 
through a maze in a certain 
amount of time. At another 
level, you may have to col- 


picked up along the way. 
There are many items to 
aid you at each level. 


Shields are important in that 
they allow you to walk 
through fire or even on wa- 
ter. Cleats prevent you from 
slipping on ice. Another 
very useful item is a mag- 
lf you manage to get 


net. 


You'll find plenty to keep you busy as you try to complete 144 


levels of maze-like puzzles in Chip’s Challenge. 


lect a required number of 
microchips or other items 
while avoiding creatures 
that chase you. Some chips 
and items may be hidden or 
placed where they aren't 
easy to find. You'll have to 
solve a problem or two to 
get to these items. For exam- 
ple, walls can appear that 
were once invisible, or you 
may have to find a way to 
cross a castle moat. 
Sometimes the order of 
how you try to accomplish a 
task is vital. At some of the 
more difficult levels, more 
than one type of puzzle 
must be solved at the same 
time. An information window 
always displays your level, 
the amount of time you 
have remaining to complete 
that level, the number of 
chips still to be collected, 
and the tools or keys you've 


one of these, then you have 
control on force floors. If you 
can’t get through a colored 
door, you may need a key 
of the same color. Colored 
buttons can also unlock 
doors for you and some- 
times either control the move- 
ments of creatures you may 
encounter or deactivate 
bombs. Sometimes these 
creatures are guarding 
these keys or items you 
need. Blocks of dirt help 
you get across water. Numer- 
ous teleports jump you to oth- 
er areas of the puzzle within 
that same level. 

Chip’s Challenge is very 
easy to learn and play. You 
use your joystick to control 
Chip's movements. The man- 
ual tells you what types of ob- 
stacles you'll face, but the ex- 
perience you gain along the 
way is important, too. As 


you progress to higher lev- 
els, you'll know more of 
what's expected of you and 
have a better idea of how to 
solve a particular puzzle. 
Thus, what you learn from 
early levels can help later in 
the game. For example, you 
may realize that certain crea- 
tures move in similar pat- 
terns or shoving a particular 
block on the water will help 
you build a bridge to cross 
a moat. 

The documentation is 
brief but effective in getting 
you on your way to solving 
the 144 levels of puzzles. Af- 
ter a quick reading, you'll 
know what to expect and 
pick up some useful hints. It 
also provides a list of items 
and obstacles that you'll en- 
counter while playing the 
game. 

The graphics and sound 
for Chip's Challenge were av- 
erage for the 64. Sometimes 
| found it was hard to tel 
what an onscreen item was 
supposed to be. If you have 
the manual nearby, most o 
the items in question can be 
matched to appropriate 
items from the list. The 
game's music gets boring af- 
ter the first ten levels, so 
did turn down the volume. 

Overall, | rate Chip’s Chal- 

lenge highly. This delightfu 
and interesting one-player 
game is a lot of fun to play. 
t'll keep you amused for 
hours and test your problem- 
solving skills as well. 
Chip really wants to join 
the Bit Busters to be with Me- 
inda, but he needs your 
help. Are you up for a real 
challenge? Chip is anxious- 
ly waiting for you at level 1! 
CHRIS SAUCIER 


Commodore 64 or 128—$34.95 


EPYX 

500 Allerton St 

Redwood City, CA 94063 
(415) 368-3200 


Circle Reader Service Number 341 


GAZETTE 
D\SK L/BRARY 


VALUE-PACKED SOFTWARE 
AT AFFORDABLE PRICES 


All Gazette disks are menu-driven for ease of use—and they feature complete 
documentation. Just load and you're ready to go! 


SpeedScript $11.95 
COMPUTE Publications’ most popular program 
ever. Powerful word processing package includes 
SpeedScript for the 64, SpeedScript 128, spelling 
checkers for both 64 and 128 versions, plus an 
additional dozen support programs, including 
mail-merge and word-count utilities. 


Gazette Index $7.95 
Every article and department from Gazette—July 
1983 through December 1989 issues—is indexed: 
features, games, reviews, programming, “Bug- 
Swatter,” “Feedback,” and the other columns. 
Disk features pull-down menus, help screens, 
superfast searching/sorting capabilities, and 
much more, 


Best Gazette Games $9.95 
Best dozen arcade and strategy games ever 
published in Gazette all on one disk. All games for 
Commodore 64, Titles: Crossroads I/: Pandemo- 
nium, Basketball Sam & Ed, Delta War, Heat 
Seeker, Omicron, Powerball, Q-Bird, Trap, Arcade 
Volleyball, Mosaic, Power Poker, and Scorpion II. 


ae 


All 6 DISKS FOR ONLY $49.95! 


* Residents of North Carolina and New York add appropriate sales tax. Canadian orders, add 7% goods and services tax. 


Gazette’s Power Tools $9.95 
Fourteen of the most important utilities for the 

64 ever published in Gazette. For serious users. 
Titles: MetaBASIC, Disk Rapid Transit, Mob Maker, 
Ultrafont+, Quick!, Disk Editor, Basically Music, 
PrintScreen, 1526 PrintScreen, Fast Assembler, 
Smart Disassembler, Comparator, Sprint Il, and 
Turbo Format, 


The GEOS Collection $11.95 
Gazette's best 13 programs for GEOS and GEOS 
128 users. Selection includes utilities, applications, 
and games. Titles: Super Printer Driver, Skeet, File 
Saver, Help Pad, Word Count, Directory Printer, 
Quick Clock, SlideShow, File Retriever, Screen 
Dumper, Font Grabber, GeoPuzzle, and 
GeoConverter. 


128 Classics $11.95 
Thirteen of Gazette’s best 128 programs, including 
utilities, games, and applications. Titles: 
MetaBASIC 128, RAMDisk 128, 80-Column Disk 
Sector Editor, MultiSort, Block Out, Miami Ice, 

The Animals’ Show, Cribbage, XPressCard, Sound 
Designer, Video Slide Show, Math Graphics, and 
3-D BarGrapher. 


ee eee 


A $13.00 SAVINGS! 


Name 

Address 

City State ZIP 

Amount Method of 

enclosed §$ payment © Check or Money Order 
O VISA or MasterCard 


324 W. Wendover Ave., Ste. 200 
Greensboro, NC 27408 
Credit card no, 


Signature (required) 
Daytime phone number 


Exp, date 


“* For delivery outside the U.S. or Canada, add $1 for surface mail or $3 for airmail. All orders must be in U.S. funds drawn on a U.S. bank. 


SPECIAL OFFER! 

' All prices include shipping & handling. 

A SpeedsScript O $11.95 
i Gazette Index O $ 7.95 
i Best Gazette Games O $ 9.95 
yj Gazette's Power Tools O $ 9.95 
i The GEOS Callection O $11.95 
128 Classics O $11.95 
§ Special 6-Disk Offer O $49.95 
] Subtotal 

' Tax* 

ff Outside U.S. or Canada** 

i Total 

i 

i 

L 


i 
i 
i 
i 
i 
i 
i 
i 
Mail to Gazette Disks (for orders over $20) ; 
i 
i 
i 
i 
i 
t 
i 
all 


REVIEWS 


PERFECT PRINT 


| love GEOS. | use it all the 
time, but there's practically 
no way around the weak 
link in its system. GEOS dot- 
matrix printouts look like 
they've been, well, printed 
on a dot-matrix printer. Pro- 
fessional Page on Amiga or 
geoWrite on the IBM use 
beautiful scalable fonts that 
make dot-matrix printouts ri- 
val laser printouts for quali- 
ty. With GEOS, unless you 
have a laser printer, you're 
stuck with blocky, jaggy, am- 
ateurish-looking fonts. 

That's all changed now, 
because Creative Micro De- 
signs, a company that 
seems determined single- 
handedly to carry the Com- 
modore computers through 
the 1990s, has released Per- 
fect Print, a new print pack- 
age for geoWrite. Its print- 
outs, using the GEOS LQ 
application, are incredible! 

Let's get a few details 
straight. For one thing, Per- 
fect Print works only with 
geoWrite. It won't work with 
geoPublish, no matter how 
hard we might wish. GEOS 
LQ, which produces the in- 
credible geoWrite printouts, 
is only one part of the Per- 
fect Print package. 

Also included are a set of 
HQ (for High Quality) printer 
drivers and fonts designed 
to work especially well with 
each other. These drivers 
are standard GEOS printer 
drivers that work with any ap- 
plication, enhancing the print- 
outs by using advanced in- 
terpolation techniques. They 
offer better results than the 
drivers that come with the 
GEOS system, even better 
than double-strike drivers. 
They aren't the stars of the 
Perfect Print show, though. 
You can find printer drivers 
on QuantumLink that will 
outperform the ones in the 
Perfect Print package. 


G-14 COMPUTE JULY 1992 


The star of the Perfect 
Print package is GEOS LQ. 
Nothing anywhere can beat 
it. You won't believe it the 
first time one of these print- 
outs comes slowly (and | do 
mean slowly) out of your low- 
ly 9-pin workhorse. 

I'm not talking about 
some pattern that’s been 


der the printhead. 

To be fair, there are a few 
niggling inconveniences. 
Speed is the primary trade- 
off, as | mentioned above. A 
full page from geoWrite can 
take ten or fifteen minutes to 
print. Also, larger point sizes 
don't have the exquisite qual- 
ity of the smaller ones. As a 


and even print a graphic: 


and even print a graphic: 


This text io formatted in California 10-polnt. I'm going to print it out using an Epson 24-pin printer and 
the L@-1500 printer driver, [switch to 14 point, bold face, dzé-sand OUttiN® modes 


This text is formatted in CaliforniaLQ 10-point. I'm going to print it out using an i 
Epson 24-pin printer and Perfect Print’s "GEOS LQ* system. I'll switch to 14 point, 
bold face, /a/cs,and outllae modes, use a Lancy-styled font, 


Here are examples of the way GEOS prints text and graphics 
(above). Beneath them are similar examples from Perfect Print. 


overprinted so many times 
that all the jaggies have 
been mushed into the 
weave of the paper and 
struck so repeatedly that a 
small font looks like a 
smudge. No, this is print 
with absolutely perfect de- 
tails, with precise curves 
and angles—even on a six- 
point font in italics. I'm talk- 
ing printouts to die for! 

Oh, come on, you say; 
there must be a catch. The 
manual is probably sketchy 
and obscure. The setup pro- 
cedure probably requires a 
degree in advanced sys- 
tems analysis to implement. 
The thing probably over- 
heats the printer. But, no, 
the manual is clear and con- 
cise. It contains more infor- 
mation than most users will 
ever need. The setup proce- 
dure is straightforward, and 
your printer won't get hot un- 


matter of fact, the larger siz- 
es are basically printed us- 
ing the same kind of interpo- 
lation routine used in the HQ 
drivers, which is good but 
not perfect. And while you 
can use most of the features 
of geoWrite, you can’t use 
the page, date, or time func- 
tions in the header or footer 
to let the system print those 
for you automatically. 

The only fonts that will 
print out in such high quali- 
ty are the specially designat- 
ed LQ fonts. Of course, 
there are more than 40 
such fonts available with 
plenty of great designs to 
choose from. If you're so in- 
clined, you can always con- 
vert or create more using 
the font-creation utilities in- 
cluded on the disk. On top 
of this, CMD has been active- 
ly soliciting some of the lead- 
ing font designers to con- 


vert their fonts to LQ format. 

GEOS LQ is one of the 
more user-friendly programs 
around. You can start it 
from within geoWrite, using 
an included desk accesso- 
ry. The control panel screen 
includes features you've 
probably never considered. 
The system fully supports 
both 9- and 24-pin printers, 
and everything is well ex- 
plained in the documenta- 
tion. You need know virtual- 
ly nothing about control 
codes or your printer's inner 
workings to use GEOS LQ. 

If you have any technical 
expertise, though, you'll find 
it possible to affect the 
GEOS LQ system at a basic 
level by changing the config- 
ure files. These files are ac- 
tually geoWrite documents, 
containing the various infor- 
mation your system needs 
to properly use GEOS LQ. 
Since they're standard geoW- 
tite documents, they can be 
examined and altered quite 
easily. Some variations are al- 
ready included on the disk, 
such as a file to set page 
length to label height and 
another to tell GEOS LQ to 
look for the fonts on a differ- 
ent drive from the one geoW- 
rite is on. 

These nifty touches are 
just icing on the cake, how- 
ever. Unless you use GEOS 
for geoPublish or geoPaint 
only, you won't want to be 
without the Perfect Print pack- 
age. Once again, CMD 
takes the Commodore and 
GEOS to unexpected and in- 
credible heights. 

STEVE VANDER ARK 


Commodore 64 or 128—$34.95 for 
all drivers, utilities, and seven fonts; 
$29.95 for package with 45 LQ 
fonts; $49.95 for all drivers, utilities, 
and 45 LQ fonts 


CREATIVE MICRO DESIGNS. 
P.O. Box 646 

East Longmeadow, MA 01028 
(800) 638-3263 

Circle Reader Service Number 342 


8 BIT 
PO BOX 542 
LINDENHURST NY 11757-0542 


NOW BRINGING YOU GREAT PRICES ON 
COMMERCIAL SOFTWARE TOO! 


Commodore Logo 


DIE a a 
HARD ; 
$5.00 
Why buy Logo? Because it is the best way 
6PACSETS for you to learn programming and for your kids 

| BACH SET $5.00 to explore math and problem solving. Logo is 
1: ASST. +) used in schools and colleges across the U.S. 
2: ADULT IMAGES 


Famous for turtle graphics, Logo lets you 
draw complex designs with a few simple com- 
mands. Easier and more powerful than BASIC, 
Logo is the perfect language for both beginners 


7:GEOS CLIP ART JOYSTICK : ; 

8: RECIPES SET OnLy $5.00 and experienced programmers. You Il love 

9: UTILITIES SET Logo’s sprites and music, list processing, global 
Aer Gua and local variables, recursion, and screen editor. 
C: MUSIC SET PARADRO Now, you can buy the complete Commodore 
D:ART GALLERY | Ht SOO VALUE! $5.00 Logo for just $19.95! Two disks plus 380 page 


Tutorial & Reference Manual. Send your check 
for just $19.95 plus $4.25 s&h, or call with 
your Visa/MC number. Call toll-free today! 


1-800-354-2744 


Terrapin Software (207) 878-8200 
400 Riverside St. Portland, ME 04103 


Circle Reader Service Number 148 


MANY ITEMS ARE CLOSEOUTS, 
AMOUNT OF STOCK IS LIMITED! 
Add $1.00 shipping per item ordered*U.S. Funds Only! 
SORRY NOC.O.D.’s OR CREDIT CARD ORDER: 
FOR A FREE COPY OF OUR CATALOG, CALL: 
(516)-957-1110 MONDAY - FRIDAY 10am to 5pm EST 


Circle Reader Service Number 162 


“Gazette Gallery,” where each month we present the 
very best in original 64 and 128 artwork. 

So don’t waste another moment. Subscribe to- 
day to COMPUTE’s Gazette Disk and get 12 issues 
for only $49.95. You save almost 60% off the single- 
issue price. Clip or photocopy and mail completed 
coupon today. 

Individual issues of the disk are available for 
$9.95 (plus $2.00 shipping and handling) by writing 
to COMPUTE, 324 West Wendover Avenue, Suite 
200, Greensboro, North Carolina 27408. 


YES! Start my one-year subscription 
to COMPUTE’s Gazette Disk right away 
for only $49.95.* 

O Payment enclosed (check or money order) 


Yes, save time and money! Subscribe to the Gazette 
Disk and get all the exciting, fun-filled Gazette pro- 
grams for your Commodore 64 or 128—already on 
disk! 


Subscribe today, and month after month you'll 


get all the latest, most challenging, and fascinating A ee ee 
programs published in the corresponding issue of Acct. No. Exp. Date 
COMPUTE. Signature = 

New on the Gazette Disk! In addition to the Name cae 
programs that appear in the magazine, you'll also atchess 
get outstanding bonus programs. These programs, ; 
which are often too large to offer as type-ins, are le ZIP] 
available only on disk—they appear nowhere else. Province Postal Code 


As another Gazette Disk extra, check out 


Mail to COMPUTE's Gazette Disk, P.O. Box 3250, Harlan, 1A 51593-2430 


“Residents of NC and NY, please add appropriate sales tax for your area. Canadian 
orders, add 7% goods and services tax. 


Gazette 
index 


Everything’s included! 
Features, games, reviews, 
education/home applications, 
programming, bugswatter, 
feedback, and columns! 


A superb interface includes pull-down 
menus, help screens, and keyboard, 


joystick, or mouse control. Features in- 


clude super-fast searching and sorting 
capabilities. An options screen allows 
you to choose text colors, drive num- 
ber, and input device. And there's full 
documentation on disk. 


Choose from three modes of opera- 
tion—browse for quick scanning, view 
for detailed information and descrip- 
tions, and edit for adding items from 
upcoming issues—and print to any 
printer. There’s even a turbo-load op- 
tion for maximum disk-access speed. 


ORDER YOUR 
1991 GAZETTE 
INDEX TODAY! 


(MasterCard and Visa accepted on 
orders with subtotal over $20.) 


To order, send $7.95 per disk, the 
quantity of disks ordered, check or 
money order,* your name and com- 
plete street address: 


1991 Gazette Index 

324 West Wendover Avenue 
Suite 200 

Greensboro, NC 27408 

*Please add $2 shipping & handling ($5 foreign) for 
each disk (residents of NC, NJ, NY please add appli- 
cable sales tax; Canadian orders, add 7% goods and 
services tax). 

All payments must be in U.S. funds. Please allow 4 
weeks for delivery. 


REVIEWS 
PREDATOR 2 


So many computer games based on 
movies are nothing more than poor 
games wrapped in catchy visuals and 
logos from the film they represent. 
That's why you should be especially 
careful when buying games of this 
type. You should look beyond the ref- 
erences to and scenes from the film 
and search for some indication of 
what the game's all about. 

Predator 2 has a strong basic game 
element that was adapted to fit the mov- 
ie's plot. This is the way it's supposed 
to work. Predator 2 is a four-level shoot- 
‘em-up that puts the player in the heat 
of battle in 1997 Los Angeles. You 
play the part of Danny Glover's char- 
acter in the movie, Detective Lieuten- 
ant Mike Harrigan. Your ultimate goal is 
to beat the Predator creature that is 
stalking Los Angeles. You must survive 
four levels of action before the climac- 
tic battle. Each level is tougher than its 
predecessor and gives you less time to 
breathe. Although Predator 2 isn't diffi- 
cult to play, only the best of the best 
will make it through the game. Most of 
your efforts will be spent trying to sur- 
pass your previous score in an attempt 
to make to the end. 

Game mechanics are simple. Move 
the cross hairs around the sideways- 
scrolling screen with a joystick (recom- 
mended) or keyboard and press the 
fire button or space bar to fire your cur- 
rent weapon. Take out all the criminals 
who show signs of resistance and do it 
quickly. Power items make your stay 
on the current level more manageable. 
These include better and faster-firing 
weapons, body armor, and ammo 
clips that appear occasionally on the 
screen. Fire at them to collect them. A 
wave of criminals at the end of each lev- 
el usually depletes your reserve lives 
and eliminates your chance for suc- 
cess. During this last volley, all of your 
shots must be well placed or the ene- 
my will overwhelm you. 

It'll take a few games before you get 
anywhere with Predator 2. More than 
any other computer game, good aim 
and conservation of ammo are extreme- 
ly important. If you hold down the fire 
button, your weapon will continue to 
fire at its maximum rate. The Mark | As- 
sault Shotgun shoots as fast as a ma- 
chine gun, and it’s very tempting to 
spread your fire. It's important to 
shoot the enemy in short bursts rather 
than laying down a constant bombard- 
ment because you'll need the firepow- 
er later in the level. Therein lies the key 
to Predator 2. Successful players will 


learn to anticipate the enemies’ appear- 
ances and eliminate the enemies be- 
fore they get a chance to shoot. The 
longer you avoid return fire, the longer 
your current life lasts, and the better 
your chance at finishing the game. 

The four levels are varied, with numer- 
ous challenges and unique features. 
You see the Predator’s outline in all of 
the levels as he stalks his prey, but 
don't fire at him! If you do, he turns one 
of his weapons on you instead of the 
criminals. The first level takes place on 
the Los Angeles streets, with drug crim- 
inals against the police. It's a practice 
level compared to what's coming next. 

The second level thrusts you into the 
penthouse apartment of the drug lord 
Ramon Vega. There are more crimi- 
nals, and they come from all directions. 
The third level takes place in the sub- 
way tunnels. Just as in the real world, 
the subway's lights affect gameplay, es- 
pecially when they shut off and you 
can't see the enemy. If you can sur- 
vive, you'll soon confront the Predator. 
The last level opens the doors of a 
slaughterhouse for your infiltration. 
This abandoned warehouse is the per- 
fect lair for the Predator. An exciting bat- 
tle concludes the game—if you can 
make it this far. 

Graphics are standard for Predator 
2. This late in the life cycle of the 64, 
developers are more concerned with 
providing a good game with good 
graphics than they are with providing a 
poor game with great graphics. Preda- 
tor 2 is the former. You can distinguish 
the guns before you collect them, but 
to help the less experienced, the 
name of each gun appears below it on 
the screen. An addictive theme tune 
makes Predator 2 a bit more exciting. 
Sound effects are fairly common. 
From a bells-and-whistles point of 
view, Predator 2 doesn’t have much to 
offer. What shines through is strong 
gameplay. 

Predator 2 is the latest product from 
the Konami/Image Works partnership 
for the 64 and 128. It makes good use 
of the machine's sprite and animation 
capabilities and packs a lot of fun ina 
simple game framework. 

The constant challenge and addic- 
tion most players will find in Predator 2 
is especially attractive to diehard shoot- 
‘em-up fans. See if you can take out 
one of the more intelligent and deadly 
hunters in the universe! 

RUSS CECCOLA 


Commodore 64 or 128—$14.95 


KONAMI/IMAGE WORKS 
900 Deerfield Pkwy. 
Buffalo Grove, IL 60089 
(708) 215-5100 


Circle Reader Service Number 343 (a) 


Calc makes your math work a breeze | of data * Uppercase, lowercase and 
— whether it's a mortgage caicuation, | Commodore graphics allavallable * Bar 


budgeting, or keeping sports statistics. | grachs on-screen with text ¢ Over two 
Or use it for your non-math chores like | dozen functions, including LOOKUP, 
‘organizing phone numbers ormakinga | AVG, IF, RND, SIN & FIX * 240 rows by 
arene el = 240 columns * Easy to remember com- 
e routines for | mands ¢ Uses disk or tape * Simple 
The Fastest ower and speed » gets resuts twice | worksheet setup + Easy text entry. 
‘8s fast as competitor's * ideal for | The Package includes a Detailed User's 
Spreadsheet catabases ~ sor by row or cour + | Guide with quick start info and 
View lots of information fast with up to | spreadsheet tips. Also on diskwith Calc 
for the fou contgyabie 


column lockng * Quick, responsive | to use worcsheets. Only $23.85 (pus 
Commodore 64 Gusorng + independent aduste | $495 shong and handing. Pease 
‘ecimal places, wicth and positioning | allow 4-7 weeks for Gelivery. 


PANKHURST PROGRAMMING P.0.Box 49135 * Montreal Quebec * Canada + HIN 3T6 


Circle Reader Service Number 152 


New for the C128! KeyDOS ROM! 


The KeyDOS ROMis a chip for the empty socket inside your C128 and adds more than 
40 new instantly available features only a keypress or two away! 
20 KeyDOS F keys for simple “point & click” multiple drive access. All major DOS functions. Fast- 
load C64 programs in 128 mode, view SEQ files, execute batch files. Print, copy, view, scratch or 
rename multiple files. ASCII/CBM converter. Full 1581 subdirectory support! RAMDOS supports 
REUs up to 2MB. GEOS RBoot. Disk editor, ML debugger, alarm clock, screen dump editor. 
LOTS MORE! Satisfaction Guaranteed! Write for more information. 
Only $32.50, See why C128 users say that KeyDOS ROM is a MUST! 


Antigrav Toolkit, PO Box 1074, Cambridge, MA 02142 
Shipping outside of US, Canada and Mexico add $3 


Circle Reader Service Number 155 


LOTSA DISKS! THE BEST in 64/128 PD. 
GEOS, Graphics, Clipart, Demos, Games, Bible, 
SID/MIDI, Educational, Basic 8 
NEW! Graphics Scanning Service 
Send stamp for FREE catalog or $2 for sample disk. 


QVERIES Diskoveries 
etbenies PO Box 9153, Waukegan, IL 60079 


Circle Reader Service Number 190 


64/128 PUBLIC DOMAIN SOFTWARE 
REQUEST FREE CATALOG or send $2 for sample disk and catalog (RE- 
FUNDABLE). Categories Include education, utllitles, games, business, 
PRINT SHOP graphics, pre-tested programs and more. Rent for 75¢ or 
buy as low as $1.00 per disk side or for 80¢ for 70 or more. $20 order 
gets 4 free disks of your choice. 

NEXT DAY SHIPPING! SINCE 1986 
pene) CALOKE INDUSTRIES (Dept. GK) 
PO BOX 18477, RAYTOWN, MO 64133 


Circle Reader Service Number 255 


KODEKRAKR LtTbD. 


Proudly presents a new innovation in software security check DE-protection! PASSCODE 
KRAKRI removes time consuming and often annoying documentation security checks in 
many of your games software programs. Lists are continually updated with the latest and 
greatest software releases available on disk! System also uses parameters which are easily 


updated with our "newest releases” list. Also available—THE PARAMETER HOTLINE—call 
On us to customize your favorite (registered owners only)! Don't let lost documents ruin 
another expensive program. TO ORDER CUSTOMIZATION PACKAGE, send $21.95+$4.00 


S/H to: 
KopeKrakr Lt. 
761 Meade Lane * Virginia Beach, VA 23455 


Circle Reader Service Number 223 


DISKS O'PLENTY INC 
7958 PINES BLVD. SUITE 270A 
PEMBROKE PINES FL 33024 
(305) 963-7750 
Call or write for free descriptive catalog of 
64/128 Public Domain & Shareware 
Choose from over 900 Disks 
Adult list of over 50 Disks available 
to those 18 or over. 


021MU_ SID MUSIC UTILITIES 


019GR PRINTSHOP UTILITIES 
019ED JRHIGH EDUCATION 
062ED HIGHSCHOOL EDUC. 
033ED TYPING / SPANISH 
031ED COMPUTER SCIENCE 
O10UT PIRATES TOOLBOX 
119GA FOREIGN ARCADE 
022GA CASINO-BOARD GAMES 
021GE GEOS FONTS 

002MS LOTTERY PROGRAMS 
003MS COLLECTORS CORNER 


Circle Reader Service Number 253 


Choose 6 for $5.00 
LIMITED OFFER 


THE STRATEGY/CAMPAIGN GAMES 
of JACK O'ROSES ©1992 
for play on Commodore 64/128 and Plus 4 
(5 1/4" disc. Specify if for Plus 4) 
$19.00 Each or $55.00 for all 3! 


THE RECENT UNPLEASANTNESS 


Individual control of 43 Confederate Divisions/149 
Bridges. Could you have turned back the Federal on- 
slaught? Don't re-fight the Civil War, declare your own! 


COMSOPAC : The Guadalcanal Campaign 
Engage the Imperial Japanese Navy in Ironbottom 


Sound. Lead air attacks on the "Tokyo Express’ in "The 
Slot”. Be with the 1st Marines and American Division 


along the Tenaru. 


MALADAN THE INVADER 


You alone, Krysiga, have the political and military 
savvy to form the Alliance and lead into battle the legions 
of the nine fuedal Lords. Slam-bang medieval combat. 
Never play the same game twice. Packed with Historical fact. 
‘Send check or money order to: 

JACK 0' ROSES 
P.O. BOX 144, MIDDLETOWN, PA 17057 
(717)944-5843 


(Commodore is areg. TMo! Commodore Business Machines, Inc. who arenot 
responsible for nor tfliated wih the appication o this software.) 


Go against the grain. 
Cut down on salt. 


7 
Adding salt to your 
-<-7 “| food could subtract 
years from your life. 


Because in some 

people salt contrib- 
utes to high blood pressure, a 
condition that increases your 
risk of heart disease. 


2, 
GPamerican Heart Association 


JULY 1992 COMPUTE G-17 


G-18 


Joystick ports are 
usually input 
devices that receive 
data. Here's an 
easy way to reverse 
that flow. 


COMPUTE JULY 1992 


BEGINNER BASIC 


Larry Cotton 


JOYSTICK OUTPUT 


As we all know, the ubiquitous 
joystick has been around al- 
most as long as the comput- 
er. When plugged into one of 
the 64's two joystick ports, it be- 
comes an input device, trans- 
lating hand movement to input 
the computer can use. 

Few people know that joy- 
stick ports can also be used 
for output. Perusing the Pro- 
grammer’s Reference Guide, 
| noticed two little-mentioned 
memory registers—56322 and 
56323—known as Data Direc- 
tion Registers (DDR) for ports 


we Shorter Lead 


a 17, bits 0 and 4 will be set 
for output. (All the rest will be 
at 0, for input.) Thus, one can 
independently control each of 
a particular joystick port's 
lines. It happens that bit 4 of 
56323 controls port 1’s fire but- 
ton line. 

How can we put this knowl- 
edge to use? Let's do a little 
work with some hardware. Lo- 
cate a discarded joystick and 
remove its cable. If you don't 
have one, Radio Shack sells a 
connector (catalogue number 
276-1538), but you'll have to 
wire it yourself. 

Most joysticks use six wires 


150-220 Q 
Resistor 


A and B. These are ports 2 
and 1, respectively, as la- 
beled on the computer. 

These two registers, when 
properly programmed, have 
the ability to change a joystick 
ports’ direction of data flow 
from input to output! Address 
56322 controls joystick port 
2's memory register 56320; 
56323 controls port 1's regis- 
ter at 56321. They behave sim- 
ilarly to the DDR at 56579, 
which determines whether the 
user port lines at 56577 are 
set for input or output. 

Each memory register in 
the 64 contains one byte, or 
eight bits. Those bits (num- 
bered 0 through 7) can be con- 
trolled independently from BA- 
SIC with the Poke command. 

If you poke memory register 
56323 with a 1, for instance, 
bit 0 will contain 1; it will be set 
for output. If you poke it with 


within the cable: the ground, 
the four direction lines (up, 
down, right, left), and the fire 
button. The fire button wire is 
usually orange, and the 
ground wire is usually black. 

Select these two wires and 
join them with an LED and are- 
sistor, as shown above. Con- 
nect the shorter lead of an 
LED to either end of a 150- 
220-ohm resistor and the long- 
er lead to the orange fire but- 
ton wire. Complete the circuit 
by attaching the free end of 
the resistor to the black 
ground wire. 

If you don't happen to have 
LEDs at home, try Radio 
Shack’s super-bright LED, cat- 
alogue number 276-087. 

Now enter the following. 


10 NT=900:FT=300:B=3: REM ON 
TIME, OFF TIME, AND NUMBER 
OF BLINKS 


20 POKES6323,17: REM FIRE 
BUTTON OUTPUT, DISABLES 
KEYBOARD, TURNS LED OFF 

30 FORT=1TOFT:NEXT 

40 FORI=1T0B 

50 POKES6321,16 

60 FORT=1TONT:NEXT 

70 POKES6321,0 

80 FORT=1TOFT:NEXT 

90 NEXT 

100 POKES6323,0: REM 

RESTORE TO NORMAL 


Save the program to disk be- 
fore going any further! 

Memory register 56323 nor- 
mally contains a 0. Because 
of the way the 64’s keyboard 
is wired, poking values to 
that register will interfere with 
the keyboard's normal opera- 
tion. To try this, poke a 1 to 
56323. 

Turn your computer off and 
on again to restore keyboard 
operation. Plug the joystick ca- 
ble into port 1. (That's the 
port closest to you.) Load and 
run the above program. The 
LED should blink three times 
and possibly will glow softly af- 
terwards, The LED turns off 
completely when the line is 
changed to output. 

Line 10 defines the con- 
stants NT, FT, and B for LED 
on-time, off-time, and number 
of blinks. Try changing these 
values. Line 20 pokes the 
DDR with a 17, which disa- 
bles the keyboard and chang- 
es the fire button line to out- 
put. Poking a 16 works also 
but leaves the cursor in a 
strange place. 

Lines 30, 60, and 80 con- 
trol the times the.LED is on or 
off. Line 40 begins a FOR- 
NEXT loop for the number of 
blinks; line 90 ends it. Lines 
50 and 70 turn the fire button 
wire on (positive DC voltage) 
and off (ground potential), re- 
spectively. Line 100 restores 
port 1 to normal operation. 

We'll look at more useful ap- 
plications next month and 
learn how to control small elec- 
trical appliances. a 


Big Blue Reader 128/64 - 4.0 


Transfers word processing, text, ASCII, and binary files between 
C64/128 and IBM PC compatible 360K 5.25” and 720K 3.5" disks. 

New Version 4.0 features: Transfers ASCII, PET ASCII and Screen 
Code files including: WordWriter, PocketWriter, SpeedScript, PaperClip, 
WriteStuff, GEOS, EasyScript, Fleet System and most others. 


The 


GRAPEVINE GROUP 


G” 


COMMODORE UPGRADES 


© Assuper-heavy. repairable C-64 power sup- © COMPUTER SAVER: This C-64 Protection 
ply with an output of 4.3 amps (that's over 3x System saves you costly repairs. Over 52% of 


as powerful as the original), Featuring 1 year C-64 failures are caused by malfunctioning euppolls CUES EO RL Bacup (ere) ag perme! WTAE) 
warranty ext fuse, schematics, UL approved. power supplies that destoy your computer programs. Reads MS-DOS sub-directories, uses joystick, and more. 
Conmodie Dagnosigan(valste@ 8635), C64, No sakoing year waranty Ae Includes C64 & C128 programs. Requires 1571 or 1581 Disk Drive, 
cna ane RepUI Cs 2 Somat oho ted as 118 Big Blue Reader 128/64 - 4.0 only $44.95 
© Our Biggest Seller © 1.8 amp repairable heavy Avoid obsolescence. Allows you to use any Version 4.0 upgrade, send original BBR disk plus $18. 


uty supply for C-64, (Over 120,000 sald.) .. $24.95 — Commodore (C-64) printer on any PC compati 
ble or clone. Does not work with 


+ EMERGENCY STARTUP KITS © Amiga... aoe $34.95 . 
Repair your awn Commodore/Amiga and save PRINTHEAD REFURBISHING Bi YZ Carc 3 ? 
lots of money. Kits contain all major chips * 
schematics, diagnostics, etc. No soldering Save time and money by having your tired, 
Send for full details. Five different kits  WOM-Cut or damaged printhead returbished or 


available peat iota baller elton conto ane . Entire Old and New Testament text on 4-1541/71 or 2-1581 disks, 
512K RAM EXPANDERS year warranty. For example: Okidata 80/90/ . Exhaustive English Concordance on 2-1541/71 or 1-1581 disks; 
100 heads are $64.95; Epson (9 Pin) EX/FX/ includes more than 700,000+ references. 


Super 1750 REU Clone (512K). Does not Lx are $69.95. 


Tequire a larger power supply ...... $142.50 3. Incredible five (5) second look-up time per/word, per/disk. 
Original REU-1750 512K Expander Unt... $131.00 REPLACEMENT/UPGRADE 4. Instant, automatic spell checking of more than 12,800 words. 
CRIESIRIEARTS 5. Boolean search options, including AND, OR & NOT logic. 

COMMODORE DIAGNOSTICIAN II SD Medea Sate 5 

or S *° 6. Search the entire Bible in 5 seconds with 1581 or HD (v3.52). 

iginally developed as a software package ( 

then converted to a readable format, the iy! 7. Money Back Guaranteed! 

Diagnostician has become a fantastic seler. 6567 Video . 4 Includes: C64 & C128 programs; printer and disk output; users 

with 38,000 sold idwide, Diagnosti: PLA 906114, ' ry " " 

cian I ules sopnsteated cess reerence All 901/225-6 EACH guide, disk case. Available on (7) 1541/71, or (4) 1581 disks. 


Qrids to locate faulty components (ICs) an all 4164 (C-64/RAM) . 
C-64 and.C1541 computers (C-128/64 mode). C-128 ROMs Upgrade ( 

Save money and downtime by promptly locat- C1571 ROM Upgrade (310654-05) 
4] ing what chip(s) have failed. (No equipment of  C-64 Keyboard (new 
any kind needed. ) Success rate from diagnosis- Commodore Cables . g 
to-repair is 98%. Includes basic schematic. $6.95 Service Manuals for C64, C126, 180; 
(Avail for Amaga computers with 31s" disk at $1495.) 1084, 1541... + $21.95 


Send For Free 36 Page Catalog 

3 CHESTNUT ST. SUFFERN, NY 10901 fae] en 
Order Line 1-800-292-7445 Fax 914-357-6243 
We Ship Worldwide Hours. 9-6 E.S.T. M-F 914-357-2424 Prices subject to change 


Tell a friend you've heard it through the Grapevine. 


KJV $49.95 vxvevevrve NIV $59.95 


"= Any questions? Call or write for more information. 
Also available! Amiga, Bible Search 


Order by check, money order, or COD. US funds only. 
= ipping ii . No Credit Card orders, 
Canada & Mexico add $4 S/H, Overseas add $10 S/H ($5 BBR) 


SOGWAP Software ® (219)724-3900 


115 Bellmont Road; Decatur, Indiana 46733 


Circle Reader Service Number 145 


Upgrade your Commodore system 


Refurbished Hardware New APROTEK modems SY Can Your 
MONITORS DRIVES OTHER 64/128/AMIGA-2400 BAUD -$119 C 

1541-$100 1660-$30 64/128/AMIGA-1 200 BAUD -$89 Computer Make 
1541-lI-$120  1670-$50 ‘APROSAND-4 SLOT CARTRIOGE * 
1571-$165 C64 -$100 EXPANDER FORTHE 64/128-$40 4) aid) 


1571-Il-$185  64C-$120 New CMD accessories YOU 
1581-$180 C128-$175 JIFFY DOS 64/128 & ANYORIVE “SYSTEM*- $85 ; 
1OO1SFD-$150 C128D-$225 128D/ANY DRIVE *SYSTEM*- $95 ) 5 | 000 000 
$32! 1530 DATASETTE-$35 on repaid erent lik, cory WZ + ] 9 
BOOKS - $10 SOFTWARE - $10-20 MLN WN ((OMb)- 
MAN ASK FORANTTHNG,IMIGHTMAVETT] = SNSPAMSIN- $78 Mla AM Sd $250 WITH LOTTERY PC YOUR NEXT TICKET 
J.P.PBM PRODUCTS BY MAIL SHIPPINGINCLUDED FORCANADA, USA +15% COULD BE WORTH MILLIONS! 
P.O. BOX 5 LOTTERY uses the raw power and storage of your 


i #1233, STATION 15 DAY WARRANTY ON REFURBISHED GOODS 
= % GST, Ontario Res. +8% PST 0 

WESTON, ONTARIO, M9L2R9 TAX-Canada+7' tario Res. +8" Computer to determine and refine the number tion 

methods that will win the various lottery games 


play Don't be limited to the one or two methods 
Other programs use. they might not work in your state. 
There is no better system available! 


Join the growing list of winners using our system. 


Commopore 64 PuBLic DomaAIN 
Highest Quality Since 1987* 


Games, Education, Business, Utilities, GEOS, Music, Graphics & earn 
More. As low as 90¢ per collection. 1 stamp for complete catalog Lona PC ) 
or $2.00 for catalog AND 30 sample programs (refundable). IBM PC/XT/AT and compatibles 


24 hour shipping. 
peng Commodore64/128 & Plus/4 are registered 
trademarks of Commodore Int 
|BM PC/XT/AT are registered trademarks of 
International Business Machines Inc 


— ee 
To order, send $29.95 for each plus $3.00 postage & 
handling per order to 

(Illinois residents add 6% sales ent 

(Grders outside North America add $3.00) 


64 DISK CONNECTION 


4291 Holland R uite 562 - Virginia Beach, VA 23452 
Formerly RVH Publications) 


Circle Reader Service Number 254 


NUCLEAR SUB 
COMMAND 


Realistic Nuclear Attack Sub Simulation 


C.0.D. orders call: 
(708) 566-4647 ( 
Superior Micro Systems, Inc. e 
Goreme om (Op 
“\ —4 


C64 oF 128 In 


‘Command Missions Ur 

Hunt Russian Typhoons 

Requires C64 GEOS 1.3 

$19.95 Check or Money Order 
VMC Software PO Box 326 
Cambria Hts. NY 11411 


Mundelein, IL 60060 


Circle Reader Service Number 221 


Circle Reader Service Number 171 


that it often remains 


G-20 


a mystery 
to programmers. 


COMPUTE JULY 1992 


MACHINE LANGUAGE 


Jim Butterfield 


SIMPLE STACK 
USAGE 


The stack is used automatical- 
ly by many activities. When 
your program calls a subrou- 
tine with JSR, the stack stores 
the return address. Later, the 
subroutine returns with RTS, 
and the stack delivers the 
stored address. Similar ac- 
tions take place with RTI and 
interrupts. In every case, the 
stack is returned to its former 
condition automatically when 
the job is done. 

The stack takes care of it- 
self so well that it often re- 
mains a mystery to program- 
mers. Since they don't often 
use the four stack-manipula- 
tion commands, programmers 
feel ill at ease with them. Here 
are those commands 


PHA Push (copy) the con- 
tents of A to the stack. 


PLA Pull the contents of the 
stack into A. 


PHP Push (copy) the PSW 
(program status word) to the 
stack. 


PLP Pull the contents of the 
stack into the PSW. 


Using these commands is sim- 
ple. Do you have something in 
the A register that you know 
you will need soon but not 
right now? Push it to the stack 
with PHA. You can store it 
there for a while then bring it 
back later with PLA. Perhaps 
you have a condition flag that 
you'll want to test later in the 
program but not immediately? 
Push all the flags with PHP, 
and bring them back with PLP 
when you want to test them. 
There's only one vital rule 
that you must follow: If you put 
it on the stack, you must take 
it off. Leave a messy stack, 
and your program will crack. 
The last thing that you pushed 


onto the stack is the first thing 
you must pull. After you push 
something to the stack, be 
very careful that your code nev- 
er branches away, leaving a 
bad stack in place. 

Let's write a small but use- 
ful program that uses the 
stack commands. It's a pro- 
gram to print the contents of a 
sequential file to the screen or 
to a printer. 

The program will connect to 
the input file, take a byte, and 
disconnect. It will then con- 
nect to the output file, send 
that byte, and again discon- 
nect. Then it will test to see if 
the input has signaled end-of- 
file (EOF). If not, back we go 
to do it all again. 

The EOF condition is signal- 
ed in variable ST (status), ad- 
dress $90 on current Commo- 
dore 8-bit machines. But 
here's the catch: It's signaled 
immediately following the in- 
put operation. If you examine 
the logic flow described 
above, you'll see that we test 
for EOF after we've performed 
an output operation. That's the 
right program point to do the 
test, but by that time, variable 
ST will have lost the vital EOF 
signal that was present after 
the program performed the in- 
put operation. 

That means we should test 
the value of ST immediately af- 
ter the input but we shouldn't 
branch based upon that test 
until a later program point. 
How may we preserve the con- 
dition flags? We do it with the 
PHP and PLP instructions. 

A second problem arises. 
We read a byte from our input 
file by means of a call to the 
Kernal subroutine at $FFE4. 
The value is placed into reg- 
ister A, which is just where 
we'll want it for output. Our 
next call, however, is to 
$FFCC in order to disconnect 
from the input stream, and 
that will destroy the contents 
of the A register. The easiest 
solution is to preserve A with 


the PHA and PLA instructions. 
Gosh, this is easy. Let's go to 
the code. 

Logical file 1 will have been 
opened as our input; logical 
file 2 as our output. First, let's 
connect to the input stream. 


2000 A2 01 
logical file 1 

2002 20 C6 FF JSR $FFC6 ; 
connect input 

2005 20 £4 FF JSR $FFE4 ; 
input a byte 


LDX #$01 ; 


Now we test ST, address 
90. A value of 0 means that 
we aren't at EOF and there 
are no other problems. Load- 
ing ST into the Y register will 
automatically set the Z flag if 
the value is 0; otherwise, the 
Z flag will be cleared. Either 
way, we'll push the flag to the 
stack and test it later. 


2008 A4 90 LDY $90; 
read ST (Z flag) 
200A 08 PHP ; 


save conditions to stack 


The byte we received from 
the input stream is still in the 
A register. But we're about to 
make a couple of calls that 
will wipe it out. So let’s put 
that on the stack, too. Remem- 
ber that since it's the most re- 
cent thing we've put on the 
stack, it must be the first 
thing we pull. 


200B 48 
save input byte 


PHA p 


Now that the byte is safely 
stacked, we can disconnect 
our input. 


200C 20 CC FF JSR $FFCC ; 
restore default 1/0 


Then we connect to our out- 
put stream, logical file 2. 


200F A2 02 
logical file 2 

2011 20 C9 FF JSR $FFC9 ; 
connect output stream 


LDX #$02 ; 


SOFTWARE 


CLOSEOUTS 


For Commodore 64 & 128 


‘STRATEGIC SIMULATIONSINC. (SS!) S1S.50EACH 
‘Typhoon of Steel, War of the Lance, Curse of 
Azure Bonds, Pool of Radiance, Countdownto 
Doomsday, Battles of Napoleon, Tony LaRussa 
Baseball, B-24, Roadwar 2000, Hillsfar, First 
‘over Germany, Heroes of Lance, Pro-Tour Golf 
Battle for Normandy, Dragons of Flame or 
Dragonstrike. 


MICROPROSE & MICROPLAY 

Acrojet, Destroyer Escort, 
Dangerous, Top Gunner, Xenophobe, Crusadein 
Europe, Decision in the Desert, Spitfire Ace, 
Hellcat Ace, Solo Flight, Silent Service, Conflict 
in Vietnam, Stunt Track Racer, 3D Pool, F-15 
Strike Eagle, Airoorne Ranger, or Pirates! 


ACCOLADE BARGAINS .... . $5.00 EACH 


PSI 5 Trading Co., Law of the West, Comics, 
Killed Until Dead, Hardball, Dambusters, Ace of 
Aces, Fight Night, orJet Boys. 


TATOPREMIUMTITLES ..... 

Alcon, Arkanoid, Arkanoid |, 

Operation Wolf, Rambo lil, Rastan or Renegade. 
ACTIVISION BARGAINS .. . $5.00 EACH 
Toy Bizarre, Mindshadow, H.E.R.0., Crossbow 
Championship Baseball, Zenji or Powerdrift. 
ACTIVISION PREMIUM TITLES . ST4.SDEACH 
Gee Bee Air Rally, Ali jostbusters |, 
Maniac Mansion, Beyond Dark Castle, Titanic, 
‘Space Shuttle, Christmas Model Kit, Mondu's 
Fight Palace, or Die Hard. 

\MINDSCAPELIQUDATION. 


oo SBSENH 
Mastertype/Writer Bundle, Perfect Score SAT, 
Shinobi, Gauntlet 2, Bop'n Rumble, ColorMe, 
Combat Course, Into the Eagle's Nest, Indoor 
Sports, Boston Computer Diet, Songwriter, 
Thunderblade, Golden Oldies, 


COMPSULT 
P.O. BOX 5160 
SAN LUIS OBISPO 
CA 93403-5160 


|AVALONHILL GAME COMPANY . .. S10.00EACH 
Under Fire, MacBeth, Wooden Ships & Iron Men, 
Ripper!, Tsushima, Stocks & Bonds, Dr. Ruth, 
Parthian Kings, Jupiter Mission 1999,T.AC., 
lLegionnaire, Tournament Golf, Maxwell Manor, 
Statis-Pro Baseball, Gulf Strike, Darkhorn 
IGuderian, Mission on Thunderhead, Panzers East 
ISuper Sunday, or Panzer Jagd. 


INFOCOM BARGAINS 

Starcross, Susp 

| MORE GREAT DEALS!!! 
Printed Word r The Tool, by Valveware 
Partner 128 (cartridge for C/128 only), 
byTimeworks 

Ghstwriter 128, by Hesware (C/128on! ibe 
Super Expander6 (cartridge), by Commodore 
/Assembler, byCommodore 

Pet Emulator, by Commodore 
Entertainer or Educator, by Valueware .... $3.75 
Tri-Math or Turtle Toyland, by HesWare ......... $450 


SS.O0EACH 
Deadline. 


Attack ofthe Mutant Camels (cartridge), by HES $3.50 


EACH. 
iron Lord, Putty’s Saga, Skate Wars,B.A T., Pick’NPile 
ese aeezI00, mrcape romenee 50 


TONS OF "ADDIT 10> 
|COMMODORE 64/128. 
@ 


‘VISAIMC ORDERS CALL TOLL-FREE 
1-800-676-6616 


Credit Card Orders Only!!! ! ($25 minimum) 


TO ORDER: Send check or money order, including 
shippingcharges ot$3 for S A. tor Canada $120 
others. California addressesmust include 7.25% sales 
tax To receive our complete catalog of over 2,000items 
tor all computer types, send $2 in cash or postage 
stamps. The catalog s FREE withany order. Tocheck tor 
an tem not listed here, call (805) 544-6616. 


WE ALSO CARRY LOTS OF 
SOFTWARE FOR IBM, APPLE, MAC, 
AMIGA, ATARI & MORE! 


Fun Graphics Machine 


FUN GRAPHICS MACHINE (FGM) IS AN “ALL-IN-ONE” GRAPHICS 
PROGRAM FOR THE C=64, WHAT CAN BE CREATED WITH FGM IS 
ONLY LIMITED BY YOUR IMAGINATION, JUST A FEW EXAMPLES: 


BUSINESS CARDS 
CUSTOM LABELS 


| 


GRAPHICS AND 


FUN GRAPHICS mA Ni 
R as INCLUDING? 


HI-RES SCREENS 


UPPORTS Imp: 
HY POPULAR 


20 
Dx 


a SCREENS CAN BE CAPTURED SIMPLY BY RESETTING — 
COMPUTER THEN LOADING THE FUN GRAPHICS MACHINE, 


€=128 KEYBOARD TEMPLATE MAKE YOUR OWN OVERLAVS- $5.00 
FGM CALENDAR TEMPLATES DAILY, WEEKLY, HONTHLY-- $5,00 
= FULL KEYBOARD OVERLAYS FOR THE FOLLOWING PROGRAMS 
(=) CMmO’S HARD DRIVE, RAMLINK, RAMDRIVE JIFFY DOS COMMANDS 
SNAP SHOT S ACTION REPLAY 4&5 EPYX FAST LOAD 
BUSINESS FORM SHOP CALC STAR BASIC 8 5fler 
ROCK’S ASSEMBLER THE FUN GRAPHICS MACHINE I 
PLEASE STATE COMPUTER (C64,C128,SX-64) OR C64 IS SHIPPED 


Ao) 
urg. OR. 974702: 


(503)- 673-2234 
ADD $3.50 FOR S/H PER ORDER 


Circle Reader Service Number 181 


Now that we've connected, 
we're ready to output. All we 
have to do is pull the data 
byte back and send it. 


2014 68 PLA 
; restore input byte 

2015 20 D2 FF JSR $FFD2 
; output it 


We've used the Kernal sub- 
routine at $FFCC before, to 
disconnect the input 
stream. Now we use it to dis- 
connect the output stream. 


2018 20 CC FF JSR S$FFCC 
; restore default 1/0 


Now the program is ready 
to test for EOF. Let's bring 
back the Z flag that we 
stashed quite a while ago. 


201B 28 PLP 
; restore condition flags 
201C FO E2 BEQ $2000 


; if not EOF, do it again 
201E 60 RTS 
; else back to BASIC 


The BASIC code pokes the 
machine language code in 


place, opens the input and 
output files, and then calls 
the machine language with 
a SYS command. When the 
ML program returns control, 
BASIC closes the two files. 
This example of stack us- 
age runs on all recent Com- 
modore 8-bit computers. To 
run this program on the old- 
er CBM and PET comput- 
ers, change the value 144 
to 150 in line 100 and the val- 
ue 4388 to 4396 in line 250. 


100 DATA 162,1,32,198,255, 
32,228,255,164,144,8, 
72,32,204,255 

110 DATA 162,2,32,201,255, 
104,32,210,255, 
32,204,255,40,240, 
226,96 

200 FOR J=8192 TO 8222 

210 READ X 

220 POKE J,X 

230 T=1+X 

240 NEXT J 

250 IF T<>4388 THEN STOP 

300 INPUT “NAME OF INPUT 
FILE”;F$ 

310 OPEN 15,8,15 

320 OPEN 1,8,3,F$ 

330 INPUT# 15,E,E$,E1,E2 


340 IF E<>0 THEN PRINT 380 IF D$="‘P” THEN A=4:GOTO 


E;E$;E1;E2:STOP 400 
350 INPUT “OUTPUT TO 390 GOTO 350 
SCREEN OR PRINTER”;D$ 400 OPEN 2,A 
360 D$=LEFT$(D$,1) 410 SYS 8192 
370 IF D$="‘S” THEN 420 CLOSE 2 
A=3:G0TO 400 430 CLOSE 1 a 


TYPING AIDS 


MLX, our machine language entry program for the 64 
and 128, and The Automatic Proofreader are utilities 
that help you type in Gazette programs without mak- 
ing mistakes. To make room for more programs, we no 
longer include these labor-saving utilities in every is- 
sue, but they can be found on each Gazette Disk and 
are printed in all issues of Gazette through June 1990. 

If you don’t have access to a back issue or to one 
of our disks, write to us, and we'll send you free print- 
ed copies of both of these handy programs for you to 
type in. We'll also include instructions on how to type 
in Gazette programs. Please enclose a self-addressed, 
stamped envelope. Send a self-addressed disk mail- 
er with appropriate postage to receive these programs 
on disk. 

Write to Typing Aids, COMPUTE's Gazette, 324 
West Wendover Avenue, Suite 200, Greensboro, 
North Carolina 27408. 


JULY 1992 COMPUTE G-21 


The GEOS deskTop is 


a very efficient 


its faults. Here’s 


a look at some deskTop 


G-22 


alternatives. 


COMPUTE JULY 1992 


GEOS 


Steve Vander Ark 


IN SEARCH OF 
A BETTER DESKTOP 


Which GEOS application do 
you use the most? You might 
think it’s geoWrite, but it's the 
deskTop. The deskTop lets 
you erase and copy files, 
page through disk directories, 
and load and run applications. 
The deskTop is like home 
base—where you go when 
you click on Quit. 

Whenever you hit a quit but- 
ton, GEOS looks for and runs 
the file called DESKTOP. Ob- 
viously, it wouldn't do to have 
an unsuspecting user rename 


_ his or her deskTop. That's why 


it's invisible to the system and 
why it isn't called an applica- 
tion in its info box. It's aGEOS 
system file 4, which is a file 
type you can’t rename. 

The deskTop, especially 
the 2.0 version, is very effi- 
cient, but it has some faults. 
Moving from page to page on 
the notepad, for example, is a 
fairly slow process, since the 
system must load each page 
and its icons separately. Also, 
the deskTop provides only 
marginal support for a third 
disk drive and until recently 
provided none at all for devic- 
es such as CMD's RAMLink. 

Over the years, program- 
mers have created several dif- 
ferent file-handling applica- 
tions to supplement the desk- 
Top. These programs buy 
speed by using text instead of 
icons to list files. Most of them 
patch the GEOS system with 
a different filename so that a 
Quit command returns you to 
them instead of the deskTop. 
Here’s a list of such programs. 

DualTop. DualTop, as its 
name implies, does the desk- 
Top one better by displaying 
the directories of two disks 
side by side. Standard file func- 
tions are accomplished by 
highlighting the filename and 
then clicking on one of the but- 
tons on the screen. DualTop 


supports three drives, includ- 
ing RAM drives. 

On Q-Link, the 128 version 
is called 128DTV27.SFX, 
uploaded by RedSonia. DUAL- 
TOP is the 64 version, upload- 
ed by JBUS. 

WormDesk. This program 
provides all normal file func- 
tions, as well as an elaborate 
view system. The directory dis- 
played can consist of only one 
type of file at a time. This usu- 
ally is fine, but once in a while 
it's nice to be able to peruse 
an entire directory, an option 
not available on WormDesk. 

The Q-Link filename is 
WORMDESKS.0O, uploaded by 
geoWorm. It's for the 64 only. 

QwikTop. The QwikTop 
screen is divided into eight box- 
es, each of which displays the 
files from a single page of the 
deskTop’s notepad. The result 
is that you get to see seven 
pages at once, plus the bor- 
der, with filenames shown in 
text. QwikTop saves space by 
including only the most often- 
used file functions, but the 
fact that you can view most of 
a disk’s files at once and 
move them around from page 
to page almost instantly 
makes this one a joy for those 
of us who like to organize our 
disks. This one's a winner! 

Q-Link filenames are 
QWIKTOP, uploaded by IL- 
LINI70, and QWIKTOP128.2, 
uploaded by GEOREP JIM. 

Mini-Desk. This Jim Collette 
masterpiece is a desk acces- 
sory which provides access to 
a few essential file-handling op- 
tions while you're within anoth- 
er application. | find this nifty 
program especially helpful 
when I'm working on a project 
where the application and the 
document are both in RAM. 
Mini-Desk lets me copy the 
file I'm working on to another 
drive, assuring me of a current 
copy even if the power fails. 

Released as part of Comm- 
Plex Software's GeoWizard 
disk, the entire package is 


$16.95 from CommPlex Soft- 
ware, 6782 Junction Road, Pa- 
vilion, New York 14525. 

Switcher. To avoid the de- 
lay while one application quits 
to the deskTop and another 
one loads, Switcher avoids the 
deskTop and provides a dia- 
log box from which to open 
the next application. This isn't 
really a full-fledged deskTop re- 
placement, but if your work re- 
quires moving from program 
to program, Switcher will cer- 
tainly keep you jumping. Its 
very small size makes it a 
boon for single-drive geoPub- 
lish users. Its Q-Link filename 
is SWITCHER 1.3, uploaded 
by Student t. 

gateWay. GateWay is more 
than a deskTop alternate. It's 
a full-blooded replacement 
with lots of great features. Un- 
til recently, gateWay was the 
only file-handling system 
which supported CMD's RAM- 
Link and RAMDrive. For more 
information, see the Gazette re- 
view (November 1991). 

GateWay ($29.95) is availa- 
ble in 64 and 128 versions 
from Creative Micro Designs, 
P.O. Box 646, East Longmead- 
ow, Massachusetts 01028. 

geoShell. GeoShell takes 
the GEOS environment full cir- 
cle, replacing the graphics in- 
terface of the deskTop with 
text commands. While this 
might seem to you like a step 
backwards, the many hot-key 
commands and the speed of 
this program might instead 
lead you to decide that it's the 
most efficient file-handling rou- 
tine around. For example, by 
typing the filename of a file on 
the current disk and pressing 
Return, geoShell quickly 
scans the directory and then 
loads and runs the file. 
There's no need to page 
through a slew of icons or 
scroll through a directory. 

For more information about 
geoShell, contact Maurice Ran- 
dall, 215 East Harris, Char- 
lotte, Michigan 48813. a 


The Gazette 
Productivity 
Manager 


(Formerly PowerPak) 


Harness the productivity 
power of your 64 or 128! 


Turn your Commodore into 

a powerful workhorse, keep track 
of finances, generate reports 
in a snap, manage your 
money in minutes— 

all with the new 1991 
Gazette Productivity 
Manager! Look at all 
your 64/128 Productivity 
Manager disk contains. 


ORDER YOUR 
1991 GAZETTE 
PRODUCTIVITY 
MANAGER 
TODAY! 


GemCalc 64 & 128— 

A complete, powerful, user- 

friendly spreadsheet with all 
the features you'd expect 
in an expensive commercial package 
(separate 64 and 128 versions are included). 
Most commands can be performed with a single keypress! 


Memo Card—Unleashes the power of a full-blown 
database without the fuss! Nothing’s easier—it’s a 
truly simple computerized address file. Just type in 
your data on any one of the index cards. Need to edit? 


Just use the standard Commodore editing keys. (MasterCard and Visa accepted on orders with subtotal over $20). 
Finished? Just save the data to floppy. What could be | °° ° # # © # ©)©6©” DDT TTSS 
easier? DYES! please send me Productivity Manager disk(s) 


($14.95 each). 

Subtotal 

Sales Tax (Residents of NC and NY please add appro- 
priate sales tax for your area, Canadian orders, add 
7% goods and services tax.) 

—— Shipping and Handling ($2.00 U.S. and Canada, $3.00 
surface mail, $5.00 airmail per disk.) 


I 
I 
I 
Financial Planner—Answers all of those questions ! 
concerning interest, investments, and money manage- 
ment that financial analysts charge big bucks for! You 1 
can plan for your children’s education and know ! 
exactly how much it will cost and how much you need 
to save every month to reach your goal. Or, decide | ——— Total Enclosed 
whether to buy or lease a new car. Use the compound | —Check or Money Order — MasterCard _ VISA 
interest and savings function to arrive at accurate ' baat 
| 
I 
| 
| 
| 
I 
I 
I 
I 
I 
I 
I 


estimates of how your money will work for you. aes 
Compute the answer at the click of a key! 


(Required) 
Daytime Telephone No, 


Name 


Address 


City 
State/ uP/ 
Province —__ —__ Postal Code 


DON’T MISS OUT ON THIS 
POWERFUL WORKHORSE! 


Send your order to Gazette 1991 Productivity Manager, 
324 W. Wendover Ave., Ste. 200, Greensboro, NC 27408. 


Don't let death act 


as an obstacle 


fo your future. Use 


G-24 


multimedia as 
a springboard to 
immortality. 


COMPUTE JULY 1992 


D'IVERSIONS 


Fred D'lgnazio 


DIGITAL 
IMMORTALITY 


When | was a child, | used to 
think | was immortal. | couldn't 
die. This type of attitude natu- 
rally led to several life-threat- 
ening experiences, such as 
jumping off roofs, almost get- 
ting hit by cars, and climbing 
on cliffs. | concluded that my 
surviving these activities dem- 
onstrated my invulnerability. 

When | grew older and had 
experienced the deaths of my 
uncle, a favorite grandmother, 
and a few assorted movie 
stars and pets, | grew wiser. | 
realized that maybe | wasn't im- 
mortal. Maybe | could die, But, 
heck, | was young. Death was 
probably 50, 60, maybe 80 
years away. | was hopeful. 
Someone was bound to discov- 
er a cure for old age way be- 
fore | got close to dying. 

| clung to this notion of a 
fountain of youth for quite a 
few years, but nowit’s starting 
to dry up. It's getting harder to 
believe in medical miracles. 
I'm 43, and there doesn’t 
seem to be a miracle drug on 
the horizon. In fact, things 
seem to be getting worse. 
With the upsurge in crime, vi- 
olence, AIDS, and so on, | feel 
far more at risk now than | did 
when | was younger. 

The other night | was watch- 
ing television, feeling kind of 
blue, and | spotted a commer- 
cial that features Elton John 
playing alongside Louis Arm- 
strong, Humphrey Bogart, and 
James Cagney. Through spe- 
cial digital techniques, movie 
images of these long-dead 
superstars have been added 
to a new ad that features a 
very much alive Elton John. 

The next night | tuned into 
the Grammy Awards and saw 
Natalie Cole win a Grammy for 
her song “Unforgettable.” To 
create this version, she used 
digital techniques to weave 
her father’s original song into 


a new recording in which the 
two of them sing a duet. Nat 
King Cole is dead, but that 
didn't stop his daughter from 
resurrecting his unforgettable 
solo and changing it into a 
hauntingly beautiful father- 
daughter masterpiece. 

Both of these instances qual- 
ify as digital immortality. | 
know that Cagney, Bogart, 
Cole, and Armstrong are 
dead, but | did see and hear 
them on television the other 
night in new productions. 

The Elton John commercial 
and the Natalie Cole song 
have been so successful that 
they're sure to spawn a host of 
imitations. Television compa- 
nies, movie houses, and ad 
agencies will search their ar- 
chives to resurrect film stars, 
political figures, authors, ath- 
letes, heroes, villains, and 
saints to mix their images with 
contemporary media figures. 
We'll soon be flooded with 
songs and commercials digi- 
tally combining the dead and 
the undead: Marilyn Monroe 
with Madonna, W. C., Fields 
with Danny DeVito, Lou 
Gehrig with Jose Canseco, 
Teddy Roosevelt with George 
Bush, Steve Martin with the 
Three Stooges. 

In fact, virtual immortality is 
nothing new. We've been get- 
ting accustomed to it for 
years. What's the effect of me- 
dia stars dying? If they're pop- 
ular, it doesn't mean that we 
no longer see them. All it 
means is that we don't get any 
new material. We still see re- 
runs of their best work. 

Are Bing Crosby and Dan- 
ny Kaye gone? It doesn’t 
seem like it after I've watched 
White Christmas. What about 
Judy Garland? Not after see- 
ing Wizard of Oz with my three- 
year-old, How about Spencer 
Tracy, John F. Kennedy, or 
Jim Morrison? It's hard to imag- 
ine Lucille Ball gone after 
watching one of her wonderful 
“| Love Lucy” episodes. 


The truth is that my memory 
of astar’s death pales in com- 
parison to the vivid, poignant 
evidence of his or her survival 
on the television or movie 
screen. The stars seem still 
alive when | see them in the 
midst of news programs, sit- 
coms, and commercials that 
feature the products and celeb- 
rities of the here and now. 

This brings me to my own 
death, or, hopefully, my own vir- 
tual immortality. | may give up 
on cryogenics, miracle drugs, 
and fountains of youth, but | 
might still achieve immortality 
through multimedia. 

| can see a whole new indus- 
try springing up as funeral 
homes retrofit middle-aged 
and older Americans with dig- 
ital re-creations of their lives. 
They can interview us to cap- 
ture our voices and images. 
They can scan in photographs 
and digitize home movies and 
audio tapes to capture us dur- 
ing our youth and our adult- 
hood. They can embed us in 
the era in which we lived and 
put a spin on the whole pres- 
entation. How do we want to 
be remembered? Nostalgical- 
ly? Romantically? Dashingly? 
Respectfully? Producers at mul- 
timedia funeral homes will be 
able to remaster our lives digi- 
tally and dramatize them ac- 
cording to our wishes. 

“This Is Your Life, Fred D'lg- 
nazio." That's what I'll get. I'll 
pay about a thousand dollars. 
It'll take only a couple of days 
to create at the local funeral 
home equivalent of a one- 
hour Insty-Prints or Moto-Pho- 
to. I'll be packaged on CD- 
ROM. I'll get a dozen copies 
to distribute to my wife, chil- 
dren, and close friends. When- 
ever they miss me or want to 
remember how | was, they'll 
boot up my disc in their com- 
puter, and I'll spring to life, 
just like Bogart, Armstrong, 
Cagney, and Cole. 

I'll be immortal. | won't no- 
tice, but others will. a 


PROGRAMS 


POP-UP 


By Richard Penn 

While entering data for an applications 
program, you suddenly need to make a 
calculation. You press a key, call up a cal- 
culator screen, determine the answer 
that you need, and then continue with 
your main program. 

The telephone rings while you're work- 
ing on areport, and you need to check a 
date while discussing an appointment. 
You press a key, call up a calendar, and 
then return to your report. 

Afterward, prior to printing your report, 
you call up a smart help screen—one 
that knows you're ready to print and dis- 
plays only a summary of printer com- 
mands, not the ten previous pages of in- 
structions that you don't need. 

If you think this sounds like something 
only an expert programmer could do in 
machine language, you're wrong. Pop- 
Up allows you to add pop-up desk tools 
to BASIC programs as easily as writing a 
GOSUB subroutine, and it lets you call 
them with a single command! 


Typing It In 

Pop-Up consists of three programs. 
The first is the actual machine lan- 
guage routine, so you'll need to use 
MLX, our machine language entry pro- 
gram to enter it. See “Typing Aids” else- 
where in this section. When MLX 
prompts you, respond with the values 
given below. 


Starting address: COOO 
Ending address: C607 


Before exiting MLX, save a copy of 
this program with the name POP-UP. 
The enclosed demonstration program 
looks for that name when it runs. 

A second machine language pro- 
gram contains sprite data for an on- 
screen calculator that’s used in the dem- 
onstration program. Again, you'll need 
MLX to type it in. When MLX prompts 
you, respond with the following values. 


Starting address: 3E00 
Ending address: 3FFF 


When you've finished typing, be sure 
to save a copy of the program as CAL- 
CULATOR.SPR. 

Finally, Demo is a BASIC program 


that shows how to use Pop-Up. To pre- 
vent typing errors, enter it with The 
Automatic Proofreader; see “Typing 
Aids” again elsewhere in this section. 


Put It to Work 

To use Pop-Up in your own applica- 
tions, add lines 30-40 of Demo to the 
beginning of your BASIC programs. 
Now let's take a look at how it works. 


Two Commands 

Pop-Up works by setting up a branch 
key. Whenever f1 is pressed, the run- 
ning BASIC program is suspended, 
and execution branches to a selected 
line. This subroutine, which runs inde- 
pendently with its own variables, con- 
tains the code for the pop-up tool. 
Pressing f1 again returns you to the 
main program without a hint that any- 
thing ever happened. Think of it as a 
powerful GOSUB key that jumps to a 
subroutine with its own screen, VIC-II 
chip, and variables. 

There are only two commands to 
learn. The first, SYS 49752, line, ena- 
bles Pop-Up and selects the line to 
branch to. This command should be 
used at the beginning of your program. 
The second command, SYS 49877, dis- 
ables Pop-Up. 


Programming Desk Tools 

A BASIC routine for an accessory 
such as a calculator is practically no dif- 
ferent from any other subroutine, ex- 
cept that you must write it as a stand- 
alone program that loops endlessly. 
Think of an accessory as a new pro- 
gram that runs from the main program 
whenever you press f1. This new pro- 
gram continues until you press f1 
again to exit. You'll see a programming 
example of this by using a calculator in 
Demo. 

When you press f1, the machine lan- 
guage routines save all important infor- 
mation about the main program, such 
as BASIC pointers, screen and color 
memory, the VIC-II chip, and variables. 
Then BASIC jumps to the subroutine se- 
lected by the SYS 49752, line com- 
mand and executes it, just as if RUN 
were typed. This subroutine has its 
own variables (2559 bytes stored at 
memory locations 50689-53247) that 
are cleared each time you press f1. 
The display, however, isn’t cleared, so 


your pop-up tools can be printed over 
the current screen for a window effect. 
The only quirk is that the cursor is po- 
sitioned one column to the right of the 
home location whenever f1 is pressed 
the second time. 

No changes made to the screen or 
sprites by the subroutine called by Pop- 
Up are permanent. Pressing f1 again re- 
stores the original program and 
screen. The only exception is the SID 
chip, which cannot be peeked and 
therefore cannot be saved. 


More Than One 

What if you want several accessories? 
Include a menu at the beginning of the 
Pop-Up subroutine for the user to se- 
lect. You might include a calculator, cal- 
endar, and notepad. 

When programming Pop-Up tools, 
it's best to write them separately and 
then merge them with your main pro- 
gram once they're debugged. This is 
because only the main set of variables 
is available to the BASIC editor. If you 
press Run/Stop while a Pop-Up subrou- 
tine is running and then type PRINT A, 
the value of A in the main program, not 
the subroutine, will be returned. 

Also, note that a renumbering utility 
won't recognize the new SYS 49752, 
line command. You'll have to change 
its line number yourself. 


Smart Help Screens 
Suppose you have a two-part program 
in which you first enter data and then 
print a report. Some programs offer a 
help key, and dumb help screens are 
always displayed in the same se- 
quence. That means users who need in- 
formation about printing but don't 
need help for entering data have to 
see the data-entry help screen anyway 
because it comes first. Smart help 
screens eliminate flipping through un- 
wanted screens because they know 
where you are in a program and only 
display relevant information. 

Programming them with Pop-Up is 
easy. In our example program, you 
might insert the command POKE 679,1 
at the beginning of the data-entry rou- 
tine, and POKE 679,2 at the start of the 
report-printing routine. 

The help screen subroutine (called 
with f1) would check location 679 with 
a line such as IF PEEK(679)=1 THEN 


JULY 1992 COMPUTE G-25 


PROGRAMS 


6 C148:85 FD A9 A3 85 FE AG OG E6 | C378:60 80 4F C7 52 58 40 FF 2B 
“iat easy fa aay. C150:Bl FD 91 FB £6 FD DO 62 FO | C38G:00 GO 55 FF 60 GO GG BG B2 
k i C158:E6 FE E6 FB D@ 62 E6 FC G5 |C388:G3 GO GB 88 BB GB GG 24 BD 

data-entry help screen would be print- | c16a:a5 FB C9 16 DG EA A5 FC 6A |C39G:6C 55 GO GO BO G2 GG GG A3 
ed. If location 679 held a 2, the pro- | c168:Cc9 63 DG E4 AO BG 85 FB 4E |C398:GG BB GB GG D6 17 GB BB 33 
gram would jump to 3000 where a re- | C170:A9 64 85 FC A9 G7 85 FD BC | C3AG:3C G3 66 GB GG G6 GG 6B 7F 
port help screen would be displayed, | C178:A9 A6 85 FE Bl FD 91 FB BF | C3A8:08 FA 9F G8 06 6G GG GO E6 
For a longer program, just include | $289:E6 FD D@ 02 EG FE £6 FB 2E |C3BG:AG G1 08 04 GG GG GB AC 26 
' C188:D@ 92 E6 FC AS FB C9 E8 3B |C3B8:GG G4 GB G2 26 GG GB GB 62 


more flags and IF/THEN statements. C190:D@ EA AS FC C9 07 D@ E4 AC | C3CG:04 GG GB 27 GO 85 GO FF D2 
C198:A9 GG 85 FB A9 D8 85 FC 1A |C3C8:00 GO FF FF G0 60 FF FF 50 
New Look and Feel C1AG:A9 EF 85 FD A9 AS 85 FE 83 | C3D0:00 GG FF FF 60 GG FF FF 58 


Pop-Up gives BASIC a new look and | C1A8:B1 FD 91 FB E6 FD DO 62 49 | c3D8:60 20 26 34 39 37 35 35 FS 
feel, Never before could software writ- | CLB@:E6 FE E6 FB DG 02 E6 FC SD |C3EG:60 30 30 30 30 FF @@ 00 FE 
ten in BASIG@/be.so: Userstriendiyanor | Gioeine oo Gece oo cn Ap Rc, 50 ||C3E@:ER EE 00 00 EF FF G6 09 76 
Ys C1C8:C9 DB DG E4 A2 GO BD D7 FO |C3FG:FF FF 60 GO FF FF 96 GG 78 
did the BASIC programmer have so | cic8:aD 9D @@ D@ ES EG 2F DG 91 |C3F8:FF FF 90 G0 FF FF 00 90 30 
much power at his fingertips. The pos- | C1Dd:F5 AE 66 AE A9 37 85 G1 DC |C40G:FF FF 06 OG FF FF 80 G6 89 
sible click-on accessories are limited on- | C1D8:9A ac F3 C5 4 BA EA Ag 18 C408:FF FF 06 06 FF FF 09 60 91 
AF rf C1EG:83 8D 62 G3 AO A4 8D G3 F7 |C410:FF FF GG GG FF FF 9G @6 99 

ly ey ead eee ee ae ram | CLE8#93 A9 57 8D 24 G3 AD Fl BE | C4l8:FF FF 03 G0 FF FF 06 G0 Al 
ven I you Gon't want to program | cipg:gp 25 g3 4C 31 EA A9 57 89 |C420:FF FF GG 00 FF FF 00 GG A9 
your own accessories, you can use the | clr8:8D 24 93 A9 Fl 8D 25 G3 5A |C428:FF FF 60 00 FF FF G6 0G Bl 
demonstration’s Pop-Up calculator in | c20d:08 A9 6G 20 90 FF 28 26 EA |C430:FF FF 00 00 FF FF 00 96 B9 
your own programs by including lines | C208:60 A6 AD EB C2 85 15 AD DF |C438:FF FF 06 60 FF FF 00 G6 Cl 


C210:EC C2 85 14 26 a6 AB 4C £7 | C440:FF FF 00 OO FF FF 08 00 C9 
20-60 and 1000-1890) C218:AE A7 78 8D E9 C2 8E EA 29 |c448:FF FF G0 OG FF FF @@ GG D1 

OP-UP €220:C2 A9 83 8D G2 G3 AS A4 CE | C45G:FF FF 00 OO FF FF 08 60 D9 
POP- €228:8D @3 63 A9 57 8D 24 63 6C |C458:FF FF 00 OG FF FF G6 60 El 


C@GG:A2 @2 BS 6G 9D FD A2 E8 1D | C236:A9 Fl 8D 25 G3 AO GB 8D 57 | C460:FF FF OG GO FF FF G8 GG ED 
C968:E9 FB D@ F6 AY FF 85 FB D6 | C238:E7 C2 AO 36 85 Gl A2 2D 9D | C468:FF FF OO GO FF FF @@ @9 Fl 
CG16:A9 OG 85 FC AO F6 85 FD 19 | C240:BD FD A2 95 66 E8 EG 39 70 |C47G:FF FF G6 OG FF FF @@ GG F9 
C@18:A9 A3 85 FE AG OO Bl FB 5C | C248:DG F6 AY 37 85 Gl AD EO 12 |C478:FF FF OO GO FF FF 80 GB G2 
C620:91 FD E6 FD D@ G2 E6 FE @2 | C250:C2 AE EA C2 58 4C 83 A4 GC | C48G:FF FF OO OO FF FF @@ GO GA 
CG28:E6 FB D@ G2 E6 FC AS FB C8 | C258:A9 EE 85 FB A9 C2 85 FC 3F |C488:FF FF 6G G0 FF 7D EA @@ DD 
CG636:C9 16 D® EA A5 FC C9 G3 1B] C266:A9 6G 85 FD AO AG 85 FE 25 | C49G:FF GG 22 GE BC 81 7D EBA ll 
C638:DG E4 AI GB 85 FB AD 64 G4 | C268:AG BG Bl FB 91 FD E6 FD 84 |C498:7D EA 06 17 C8 GE BC 81 86 
CG46:85 FC A9 G7 85 FD AQ A6 87 | C276:DG 62 E6 FE E6 FB DG G2 76 | C4AG:85 BD GC BD BA GE GF FF ES 
C@48:85 FE Bl FB 91 FD E6 FD 92 | C278:E6 FC A5 FD C9 FD D@ EA 18 | C4A8:7D EA 62 G7 26 21 DA E4 7C 
C@50:DG8 G2 E6 FE E6 FB D@ 62 52 | C280:A5 FE C9 A2 DG E4 28 FD 54 | C4BG:GD G7 FF 7D 78 85 Gl GB 36 
CG58:E6 FC A5 FB C9 E8 DG EA 7F | C288:AE 26 8A AD 26 F7 B7 AS 8F | C4B8:22 CF E5 OO GA 14 El 64 CC 
CG6G:A5 FC C9 97 DG E4 AX BB BB | C29G:14 8D EC C2 A5 15 8D EB D5 |c4c@:A5 85 A4 81 F417 81 80 B2 
CG68:85 FB A9 D8 85 FC AY EF D1 | C298:C2 AX GB 8D E7 C2 78 AI A7 | C4C8B8:GG GB BG Gl 86 66 BG 4G 18 
C076:85 FD A9 AS 85 FE Bl FB 8B | C2AG:AB 8D 14 63 AX C2 8D 15 9A | C4D6:00 GE G1 BC 74 AT 79 AG OA 
C678:91 FD E6 FD D@ 62 E6 FE 5A | C2A8:03 58 68 AS C5 CD E8 C2 26 | c4p8:9C 2C 9E 35 32 39 39 35 DC 
C680:E6 FB D®@ 62 E6 FC AS FB 21 | C2BG:FO 20 8D E8 C2 C9 46 FO AS | C4EG:GG 35 BB BH BO BB OB BO B7 
C688:C9 E8 D@ EA AS FC C9 DB 82 | C2B8:19 C9 64 DB 15 AD 8D G2 47 | C4E8:2E 4F 42 4A 22 2C 38 2C AB 
CG96:D6 E4 A2 86 BD BG DGB 9D 35 | C2CG:DG 10 AD E7 C2 49 G2 8D B3 | C4FG:31 GG GG GH BB BB BB GB 13 
C698:D7 AD E8 EO 2F D@ F5 BA FF | C2C8:E7 C2 FO G3 4C BG CH 4C 71 | C4F8:GG GG BB BH BG GG GB BG 82 
CGAG:8E 06 AE AJ 36 85 Gl A2 C7 | C2DG:2E Cl 4C 31 EA 78 AQ 31 38 | C5GG:G8 BG GB GB BB GG GB GG BB 
CGA8:62 BD GG AG 95 BG EB EG B4 | C2D8:8D 14 63 AY EA 8D 15 63 DF | C5G8:08 GG BO BB GB BG BB GB 93 
C@BG:D9 DG F6 A2 F3 BD 66 AG 93 | C2EG:A9 BG 8D E7 C2 58 68 GH AZ |C510:66 BG BG GB BG BG BB GO 9B 
COB8:95 66 E8 EG FB D@ F6 AY EA | C2E8:04 46 GG G3 EA FF 94 FF 31 |C518:00 66 OG GO GB BB GG BG AZ 
C6CG:EB 85 FB A9 AG 85 FC AX 72 | C2FG:G6 AA Bl 91 B3 22 22 GB DA |C52G:08 BG BG GB GO BG BB GB AB 
COC8:FF 85 FD A9 @@ 85 FE Bl CB | C2F8:98 4C O60 FF G6 64 GB BH Al |C528:06 BG GB GB BG BG BG GO B3 
C@DG:FB 91 FD E6 FD D@ G2 E6 G1 | C36G:G2 OO 7F CB 19 16 GG BA 66 |C536:G6 GBB BH GO GG BG GB GB BB 
COD8:FE E6 FB D@ @2 £6 FC AS 6B | C308:76 A3 G4 EA BB GB GB GB 3B | C538:G68 BG GB GB BB BG GB BB C3 
CGEG:FB C9 6D D@ EA AS FC C9 3F | C316:76 A3 B3 BD 51 BG GB BB 98 |C54G:G8 BG BB GB GB BG BG GO CB 
CGE8:A2 D@ E4 AE FC A2 AY 37 74 | C318:96 61 68 G1 C6 G1 C6 G1 BY | C548:496 BB BG GB BG BG BB BB D3 
CGOFG:85 G1 9A A9 F6 8D 24 G3 9C | C320:C6 FF CF G6 OG FF CF FA 9F |C554:46 GG GG GB BG GG GB BB DB 
CGF8:A9 Cl 8D 25 03 AS 13 8D 36 | C328:FF FA @@ 4F GC 5C 4E D3 A5 | C558:98 BG BG GB GB BG AG GB 65 
C190:77 @2 AY BD 8D 78 G2 AY Cl | C33G:17 G3 G2 53 41 24 18 1E 62 |C56G:GE F6 G4 GA GO G2 16 GO FO 
C108:02 85 C6 AQ 1A 8D G2 G3 6F | C338:18 FF GB GG GG GG 1E 18 81 |C568:GG 48 EB GG GB GG BG GB 83 
C116:A9 C2 8D G3 63 A2 1A BS 87 | C340:90 63 4C B7 GB GBB 69 17 77 |C570:GG GO BB GB BG BG GG GO FB 
C118:D8 69 8G 95 D8 CA DG F7 3F | C348:62 17 GB GG BB BH GB BA DG |C578:G6 GB BH GB GO BG BO GB B4 
C120:A2 @8 BD F7 67 9D EA C5 78 | C350:76 A3 19 GB BB BB BB 9B AF | C58G:GG AD 57 8D 24 B3 AY Fl AC 
C128:CA D@ F7 4C 31 EA A9 36 C7 | C358:CB 7A 6G GB GB 76 BB 8G BE |C588:8D 25 63 AD BB 85 15 AD B9 
€130:85 G1 A2 @2 BD FD A2 95 EB | C36G:A3 E6 7A D@ G2 E6 7B AD 26 | C596:64 85 14 26 A6 AB 4C AE 53 
C138:00 E8 EG FB D@ F6 AO FF 87 | C368:06 G2 C9 3A BO GA C9 26 Bl |C598:A7 BG BB GB BG BB GB BO F7 
C146:85 FB A9 06 85 FC A9 F6 25 | C37G:FO EF 38 E9 3G 38 E9 DG 19 |c5AG:GG GB BG BA GB BB BG BB 2c 


G-26 COMPUTE JULY 1992 


C5A8: 06 
C5BG: 08 
CS5B8: 96 
C5CO: 88 
C5C8: 90 
C5DG: 66 
C5D8:96 
C5EG:1A 
C5E8:96 
C5FG:6B 
C5F8:9D 
C66G:Cl 


ao 
ao 
ao 
Uy) 
ao 
Cs) 
ao 
A7 
BO 
8E 
F7 
ao 


UT) 
i) 
1) 
1) 
i) 
6G 
8B 
E4 
DA 
53 
07 
U1) 


CALCULATOR.SPR 


3E06:5E 
3E68:BO 
3E10:AA 
3E18:00 
3E26:06 
3E28:06 
3E30:06 
3E38:00 
3E40:AA 
3E48:5E 
3E5@:AA 
3E58:60 
3E69: 00 
3B68:00 
3E76:66 
3E78:00 
3E80:5E 
3E88:5E 
3E9G:AA 
3E98:60 
3EAG: 06 
3EA8: 66 
3EBO:00 
3EB8:60 
3ECG:6A 
3EC8:5E 
3ED@O:AA 
3ED8:00 
3EEG:08 
3EE8:00 
3EFO:9G 
3EF8:06 
3F66:55 
3F08:BO 
3F10:5E 
3F18:BE 
3F29:BG 
3F28:5E 
3F30:BE 
3F38:BG 
3F40:55 
3F48:AA 
3F50:5E 
3F58:EA 
3F60:AA 
3F68:5E 
3F7G:AA 
3F78:AA 
3F80:55 
3F88:AA 
3F90:55 
3F98:FF 
3FAG:AA 
3FA8:5E 
3FBQ:BE 


SE 
BE 
BO 
Ui) 
Ct) 
ly) 
6o 
66 
5E 
AA 
AA 
Cy) 
Vs) 
1) 
C1) 
oo 
5E 
BE 
AA 
Ut) 
Ui) 
06 
06 
Ur) 
AS 
6A 
AA 
66 
Ct) 


Bo 
BE 
FF 
06 
oo 
ri) 
U)) 
06 
5E 
BE 
FF 
66 
1) 
6o 
CI] 
i) 
5E 
BE 
EE 
Cr) 
Vy) 
C1) 
Cr) 
14) 
SE 
AB 
7E 
06 
oo 
Cr) 
Cs) 
66 
50 
AA 
5E 
BO 
AA 
5E 
Ba 
AA 
55 
AA 
EA 
BE 
AA 
AA 
BE 
AA 
55 
AA 
55 
FF 
AA 
SE 
BE 


3FB8:AA AA AA AA 5A 5A 5A CO E8 
3FC0:55 55 55 6A AA AA 6A AA 16 
3FC8:AA 6A AA AA 65 55 55 65 C7 


65 55 55 65 55 55 91 
FF 6A AA AA 6A AA 33 
AA AA 6A AS 5A 6A 58 
6A AS 5E 6A A5 SE BF 
FE 6A AA AA 6A AA 95 


3FF8:AA 6A AA AA 6A AS 5A A5 AB 


DEMO 


FF 28 POKE5328@,6:POKE53265,11 


BA 


PX 


BJ 


AX 


QA 


KK 


36 
46 
56 
66 
76 
86 
96 


166 


116 


126 


136 


146 
156 
166 
161 
162 


163 


164 
165 


166 


167 


168 


169 


116 


:POKE53281,8:PRINT" {CLR} 
":POKE53265,27 
POKE147,6:SYS57812"POP-U 
P",8,1:SYS62631 
POKE147,@:SYS57812"CALCU 
LATOR. SPR", 8,1:SYS62631 


$Y$49752,1020:REM ENABLE 
POP-UP AND SET LINE TO 
{SPACE}BRANCH TO 


A$="{RED}{13 SPACES}COPY 
RIGHT 1992"+CHRS (13) 
AS=AS$+"{4 SPACES}COMPUTE 
PUBLICATIONS, INTL, LTD 
"+CHRS (13) 

AS=AS+"{1@ SPACES}ALL R 
IGHTS RESERVED":FORT=1T 
06:AS=AS+CHRS (13) :NEXT 
BS="{YEL}{9 SPACES}POP~ 
UP DEMO PRESS <F1>":FOR 
T=1T06:BS=BS$+CHR$ (13) :N 
EXT 
FORT=1TOLEN (A$) : PRINTMI 
D$(A$,T,1);:FORDL=1T046 
:NEXT:NEXT 
FORT=1TOLEN (BS) : PRINTMI 
D$ (B$,T,1);:FORDL=1T049 
: NEXT: NEXT 

GoTO12¢6 


@ REM POP-UP CALCULATOR 

O: 

@ V=53248:POKEV+21,6:S=2 
55:FORT=2640T02047:POK 
ET,S:S=S-1:NEXT 

@ FORT=39T046:POKEV+T, 12 
:NEXT: POKEV+37,15: POKE 
V+38,11:POKEV+28, 255 

@ S=0:FORT=GTO6STEP2:POK 
EV+T ,32+S:S=S+48:NEXT 

@ S=0:FORT=8TO14STEP2:PO 
KEV+T , 32+S:S=S+48:NEXT 

@ FORT=1TO7STEP2:POKEV+T 
,98:NEXT:FORT=9TOL5STE 
P2:POKEV+T, 140:NEXT 

@ POKEV+29,255: POKEV+23, 
255: POKEV+21,255 

@ PRINT" {HOME}{5 DOWN}": 
FORT=1T07: PRINT" 
{RIGHT}{23 SPACES}":NE 
XT 

@ POKEV+27,255:PRINT" 
{HOME}{7 DOWN}"TAB (15) 
"{2}C 7 8 9":PRINT 

6 PRINTTAB(4)"{RED}M+ * 
{SPACE}+ %{3 SPACES} 


sD 


JG 


1116 


1126 
1136 
1146 
1156 
1166 
1176 
1186 


1196 
1206 


1216 


1226 
1236 


1246 
1256 


1266 


1276 


1286 


1296 
1366 
1316 
1326 


1336 
1346 


1356 


1366 


1376 


1386 
1396 


£2}. 4.5 6":PRINT 
PRINTTAB(4)"{RED}MR / 
{SPACE}- ={3 SPACES} 
{236 1 2 3" 

GOSUB1286 

RT=V:01S=O0P$ 
GOSUB1296:V1=V:02$=O0P$ 
IFO1$="+"THENRT=RT+V1 
IFO1S$="—"THENRT=RT-V1 
IFO1S="*"THENRT=RT*V1 
IFO1$="/"ANDV1=@THEN12 
16 
IFO1S="/"THENRT=RT/V1 
IFLEN (STR$ (RT) ) <12THEN 
1236 

PRINT" {HOME}{7 DOWN} 
{2 RIGHT}{6 SPACES}ERR 
OR":GETAS: IFAS<>" 
{HOME} "ANDAS<>"{CLR}"T 
HEN1216 

GoTo112¢ 

PRINT" {HOME}{7 DOWN} 
{2 RIGHT}{1l1 SPACES}": 
PRINT" {HOME}{7 DOWN}"T 
AB (13-LEN(STR$(RT)))RT 
IFO2$<>"="THENO1$=02$: 
GOTO1146 
POKE198,@:WAIT198,1:GE 
TAS: IFAS="="THEN1256 
IFAS="+"ORAS$="~"ORAS=" 
*"ORAS="/"THENO1S=A$:G 
0T01146 
DS="":C=G:DP=G:2Z=0:GOS 
UB1319:GOTO1130 

PRINT" {HOME}{7 DOWN} 
{2 RIGHT} {BLU} 

{16 SPACES}@" 
DS="":BS="{11 SPACES}" 
:C=0:DP=6:2=0 
POKE198,@:WAIT198,1:GE 
TAS 
IFAS$="{HOME}"ORAS=" 
{CLR} "THENCLR:GOTO1129 
IFZAND (AS="+"ORAS="~"0 
RAS="*"ORAS="/"ORAS="= 
") THENOPS=AS$: V=VAL (DS) 
: RETURN 

IFAS=". "ANDDP=GTHENDP= 
1:GOSUB1370:GOTO1368 
IFASC (A$) <480RASC (A$) > 
570RC>9THEN130G 
IFAS="Q"ANDDP=GANDVAL ( 
D$) =@THENGOSUB1390:GOT 
01308 

DS$=D$+A$: PRINT" {HOME} 
{7 DOWN}"TAB (2) LEFTS (B 
$,11-LEN (DS) )D$:C=C+1: 
Z=1:GOT01300 

IFVAL (D$) =@THENDS$="@": 
C=1:Z=1 

RETURN 

PRINT" {HOME}{7 DOWN} 
{2 RIGHT}{1@ SPACES}6" 
:Z=1:RETURN 


Richard Penn is a prolific Commodore 
Programmer who lives in Montreal, Que- 
bec, Canada. 


JULY 1992 COMPUTE G-27 


PROGRAMS 


MIMIC 128 


By Joseph Sheppard 
| set out to design this diversion just to 
show my parents that all my hours in 
front a computer weren't a waste of time. 
Mimic 128 does a good job of showing 
off how easy it is to use the 128's sound 
and graphic commands in BASIC. 
Mimic 128 is asimple but entertaining 
game that's similar to the hand-held elec- 
tronic game Simon Says. The computer 
lights one of four colored panels at ran- 
dom and plays a corresponding musical 
tone. You're to press the joystick up, 
down, left, or right to light the same pan- 
el in response. If you're successful, the 
computer will repeat the sequence, add- 
ing an additional panel each time to the 
series. The object is to mimic the comput- 
er, lighting the same sequence of panels. 


Entering the Program 

Mimic 128 is written entirely in BASIC 
7. To help avoid typing errors, enter 
the program with The Automatic Proof- 
reader; see “Typing Aids” elsewhere in 
this section. Be sure to save a copy of 
the program to tape or disk before you 
exit Proofreader. 


High Scores 

For those with a competitive nature, 
Mimic 128 has a high-score sequential 
file named MM.HS that keeps track of 
the best player's name, date, and the 
number of panels he or she has prop- 
erly responded to. The first time the pro- 
gram is run, MIMIC searches for this 
file. Since no such file exists, the first 
player will beat a high score of 0. The 
first player is guaranteed a spot on the 
disk for at least one session, no matter 
how badly he or she plays. 


Tape Support 
Players using tape drives should mod- 
ify the OPEN statements in lines 35 
and 30120 to ,1 instead of ,8. Also, 
tape users should immediately play a 
game to establish the high-score file di- 
rectly behind the section of tape 
where the game file has been saved. 
After you finish a game, the comput- 
er will check to see if you made the 
high score. If so, you'll be asked for the 
appropriate information. After a game, 
you'll be presented with a menu 
whose choices consist of Try again, 


G-28 COMPUTE JULY 1992 


Continue, and End. Select Continue if 
you wish to continue with the current 
game. The computer won't accept a 
high score based on the continuation 
of an old game, however. Try again 
starts a new game, and End returns 
you to BASIC. 

One last note: Be sure to explore the 
sound capabilities of your machine. 
Feel free to alter the sound envelopes, 
producing different tones and sounds 
for each panel. You can also make the 
final sound of the game (the one gen- 
erated when you mess up) a little less 
dramatic and frightening. 


MIMIC 128 


MM 5 REM COPYRIGHT 1992 - COMP 
UTE PUBLICATIONS INTL LTD 
- ALL RIGHTS RESERVED 


CG 16 DIM MD$(6) ,MC(60) ,MCS(6 
6) 
QR 20 COLORG,1:COLOR4,1 
EE 30 PRINT" {CLR}":PRINT"DIFFI 
CULTY LEVEL (1-EASIER TO 
5-BORING) ":GETKEYDL 
RE 32 IFDL<1ORDL>5 THEN30 
FG 35 OPEN2,8,2,"MM.HS,S,R" 
RB 36 INPUT#2, ZNS$(1),22$(1),2 
D$ (1) 
PG 37 DCLOSE 
MB 38 22(1)=VAL(2Z$(1)) 
SJ 66 PRINT" {CLR}":FORZ=1T012: 
PRINT: NEXTZ: PRINT" 
{12 SPACES}SETTING UP BO 
ARD":PRINT"{1@ SPACES}TE 
N SECONDS, PLEASE.":SLEE 
P2 
QE 70 FAST 
RR 89 GOSUB1G00G 
HP 98 SLOW 
QS 166 NT=RND(TI) :NT=INT(RND (1 
)*44+1) 
XA 116 NTS=STRS (NT) 
RQ 126 IFNT=1THENNNS="C":X=17: 
Y=9:C=6 
QX 136 IFNT=2THENNNS="D":X=26: 
¥=12:C=7 
JK 140 IFNT=3THENNNS="E":X=17: 
¥=15:C=8 
PX 15@ IFNT=4THENNNS="E":X=9:Y 
=12:C=3 
EF 166 MSS=MSS$+NN$ 
FK 176 COLOR2,2:FORZ=1T0600:NE 
XTZ:GOSUB26608 
SA 186 AS="" 
KS 190 FORT=1TO (LEN (MSS) ) 
MM 206 MC(T)=JOY (2) 
MX 202 IFMC(T)=1THENMCS (T)="C" 
:X=17: C=6:GOTO219 
GD 263 IFMC(T)=3THENMCS (T)="D" 
:X=26:Y=12:C=7:GOTO21G 
QS 204 IFMC(T)=5THENMCS (T)="B" 
:X=17:Y=15:C=8:GOT0210 
JA 265 IFMC(T)=7THENMCS (T)="F" 


:X=9:Y=12:C=3:GOTO216 


KJ 


SQ 
GG 
Qu 


MH 


HQ 


SH 


FB 


AR 


EH 


Gc 


AQ 


GR 
ED 
DG 
ES 
SB 
GD 
AB 
FR 


RB 
KK 


266 
216 
226 
221 
222 
224 
226 


234 
236 
238 
246 


243 
996 


994 
995 


996 


997 
998 


16600 


10601 


16665 
16160 


16116 
16126 


161306 


10146 


16266 


16216 
16226 
16236 
16248 
16258 
16368 
16999 
20068 


20168 
20116 


GOTO266 

IFMC$ (T) <>MDS$ (T) THEN24G 
CHAR2,X-1,Y,"CORRECT" 
PLAYMCS (T) 
FORZ=1TODL+75:NEXTZ 
COLOR3,C 
CHAR3,X-1,¥,"{7 SPACES} 
"1 

AS=AS+MCS (T) 

NEXTT 

IFAS$=MSSTHEN1GG 
SOUND2,2500,60,2,2470,2 
71,3048 

SOUND3, 2600,50,2,,3,3 
PRINT"YOU GOT";LEN (MS$) 
~1; "CORRECT !": SLEEP3 
IFQQ=GTHENGOSUB30000 
FORZ=1T024: PRINT: NEXTZ: 
INPUT"{BLU}DO YOU WISH 
{SPACE}TO (T)RY AGAIN, ( 
C)ONTINUE{3 SPACES}OR ( 
E)ND";MS 
IFMS$="T"THENQQ#G: PRINT: 
PRINT: PRINT:AS="":MS$=" 
"PRINT: PRINT: PRINT :GOT 
0108 
IFMS$="C"THENQQ=1: PRINT: 
PRINT: PRINT: GOTO176 
GRAPHICG,1:END 

REM ***{2 SPACES}GRAP 
HIC SETUP{2 SPACES}** 
* 


REM ***{2 SPACES}PLAY 
ING BOARD{2 SPACES}** 
* 


GRAPHIC4,1,23:COLOR1, 
2 
WIDTH2:DRAW1,28,46TO7 
3,46T078,53T083,46TOL 
27,46T0142,75T0142,12 
370127,152T083,152T07 
8,145T073,152T028,152 
7T014,125T014,747T028,4 
6:WIDTH1 
DRAW1,51,66T0105,66TO 
85,90T071,90T051,66 
DRAW1,72,169T084,109T 
0164,132T051,132T072, 
109 
DRAW1,95,937T0115,75TO 
129,75T0129,123T0115, 
123T095,105T095,93 
DRAW1,61,105T061,93TO 
41,75T029,75T029,123T 
041,123T061,165 
COLOR1,16:COLOR2,3:CO 
LOR3,7 
PAINT2,50,100,1 
PAINT3,101,106,1 
COLOR2,6:COLOR3,8 
PAINT2,60,75,1 
PAINT3,75,120,1 
CHARL,17,12,"MIMIC" 
RETURN 

REM{2 ‘SPACES}*** 

{2 SPACES}LIGHT UP PA 
NEL{2 SPACES}*** 
FORT=1TOLEN (MSS) 

MDS (T) =MID$ (MS$,T,1) 


GH 26120 
HD 261386 
JD 26146 
BD 26142 


NEXTT 

FORT=1TOLEN (MSS) 
PLAYMDS (T) 

IFMDS (T) ="C"THENX=17: 

Y=9:C=6 

IFMDS (T) ="D"THENX=25: 

¥=12:C=7 

IFMD$ (T) ="E"THENX=17: 

Y=15:C=8 

IFMDS (T) ="E"THENX=9 2 Y 

=12:C=3 

CHAR2,X,Y,"PRESS" 

FORZ=1TODL*106:NEXTZ 

COLOR3,C 

CHAR3,X,Y,"{5 SPACES} 
"1 

NEXTT 

RETURN 

MS=LEN (MS$) -1 
IFMS<ZZ(1) THENRETURN 

GRAPHICG,1 
PRINT" { RED }CONGRADULA 

TIONS! YOU HAVE JUST 
{SPACE}BEAT THE 

{2 SPACES}PREVIOUS RE 

CORD OF" 

PRINT"{GRN} ";ZZ(1);" 
{RED} SET BY {GRN}";Z 
N$(1);" {RED}ON {GRN} 
";ZDS(1);"{RED}" 

GETKEYAS 

PRINT: INPUT"WHAT IS Y 

OUR NAME"; ZNS (1) 
INPUT"WHAT IS TODAY'S 
DATE"; ZDS (1) 

22 (1) =MS:GS$=CHR$ (13) 
PRINT: PRINT" {BLU }ONE 
{SPACE}MOMENT; SAVING 
SCORES..." 
SCRATCH"MM.HS" 

OPEN2,8,2,"MM.HS,S,W" 
PRINT#2, ZNS(1) GS 22 
(1) G$ zD$(1) 

DCLOSE 

GRAPHIC4,G, 23 

RETURN 


DD 26144 
QH 20146 
XC 26148 


RQ 26156 
KM 26160 
QB 20176 
AS 26180 


ER 26199 
FG 26199 
JP 36069 
EM 36010 
QD 36629 
DK 36636 


BF 36646 


CX 360656 
RA 36066 


ER 36676 


PA 36086 
JB 36196 


RP 36116 
RJ 36126 
EE 36130 


Qs 30146 
HK 36156 
AD 36160 


Joseph Sheppard lives in West Fork, 
Arkansas. 


SPEEDPURGE 


By Daniel Lightner 

SpeedCheck is a popular utility program 
that checks for misspelled words in any 
SpeedScript word processing document. 
It examines text word by word, compar- 
ing words in the document with entries in 
its dictionary. If the program comes 
across a word it doesn’t recognize, it high- 
lights the word on your screen so that 
you can correct any misspellings imme- 
diately. If SpoeedCheck comes across a 
correctly spelled word that isn't in its dic- 
tionary, it will also highlight that word. 
These new words can then be added to 


SpeedCheck's dictionary. As you work 
with SpeedCheck, you can create your 
own personalized dictionary disks, 
which may contain thousands of words. 

Words on the SpeedCheck dictionary 
disk are kept in sequential files, with one 
file for each of the 26 letters of the alpha- 
bet. As new words are added, they are 
tacked onto the end of the appropriate 
file. This makes adding words to the dic- 
tionary fast and simple, but it makes look- 
ing up words slower because words are 
added in random—rather than alphabet- 
ical—order. Within the file for Z, for exam- 
ple, zebramight be found between zymur- 
gy and zipper. 

The only way to find a particular item 
in randomly ordered data is to search se- 
quentially from the first item until the de- 
sired item is found. Thus, when Speed- 
Check looks up a word, it must hunt 
through all the words with the same initial 
letter before it can determine whether or 
not that word is present. 

People who use SpeedCheck know 
how easy it is to have dictionary files con- 
taining duplicate words. SpeedCheck's 
Disk Manager program can help, but it's 
difficult to find duplicates if there are 
many words between them. Sometimes 
there may be three or four duplicate 
words hogging space on the disk, slow- 
ing down SpeedCheck. 

Purging files manually for duplicate 
words can be a tedious task for a human, 
but it's an ideal chore for a computer. 
SpeedPurge is just such a utility. It search- 
es SpeedCheck dictionary files for dupli- 
cate words and deletes them. 


Entering the Program 

SpeedPurge is a fairly short BASIC pro- 
gram. To help avoid typing errors, how- 
ever, enter the program with The Auto- 
matic Proofreader. See “Typing Aids” 
elsewhere in this section. When you've 
finished typing, be sure to save the pro- 
gram to disk. 


Purge Your Files 

SpeedPurge is easy to use; just load 
and run it. When you're ready to start, 
place the disk containing the Speed- 
Check dictionary files in drive 8. 
SpeedPurge prompts for a filename, 
and you enter the letter of the alphabet 
that represents the file that you wish to 
check. For example, press A to check 
the A file and B to check the B file. 


SpeedPurge reads the file into an ar- 
ray and converts it to ASCII format. 
Then it checks the entire file for dupli- 
cate words. When SpeedPurge finds a 
match, it displays the word and the lo- 
cations in the file where the match was 
found. Then it deletes one of the pair. 
It then continues searching until anoth- 
er match is found or until the entire file 
has been checked. When it has fin- 
ished checking the file, SpeedPurge 
asks whether or not you wish to save 
the corrected file. Obviously, if no 
matches were found, there would be 
no need to save the file. Press N if you 
don't want to save it; press Y if you do. 

After it has finished saving the file, 
SpeedPurge asks if you wish to check 
another file. Type Y to continue check- 
ing files or N to exit SpeedPurge. 


SPEEDPURGE 


SH 5 REM COPYRIGHT 1992 

HK 16 REM COMPUTE PUBLICATIONS 
INTL LTD 

REM ALL RIGHTS RESERVED 

CLR: DIMAS (500) :OPEN15,8, 

15 

PRINT" {CLR} {DOWN} 

{12 RIGHT}{7}SPEEDPURGE 
{2 DOWN}" 

POKE53280,0:POKE53281,0 

INPUT" {BLU}FILE {RED} (A- 

Z) {BLU}";F$ 

IFLEN (FS) >1THEN25 

IFASC (FS) <650RASC (FS) >99 

THEN25 , 

OPEN2,8,2,"0:"+FS$+",S,R" 
:GOSUB225:BS=FS$:X=1: POKE 

781,2:SYS65478:SYS65487 

SY¥S65487:A=PEEK (780) 
IFA>127THENA=A-64 :BS=BS+ 

CHRS (A) :A$ (X) =BS:BS=F$:X 

=X+1:GOTO8G 

IPA=39THEN75 
IFA<64THENA=A+64 

BS=BS$+CHRS$ (A) 
IFST=@THENSS 

CLOSE2: POKE781,0:SYS6547 
8:X=X-1 

Z=1 

IT=G6: PRINT" {DOWN} {7}":FO 
RT=ZTOX:AS=AS (T) : PRINT" 
{UP}{8 SPACES}{8 LEFT}"; 

T;"-";X:FORR=1TOX 
IFAS=AS$ (R) THENIFR<>TTHE 
NGOSUB226 
NEXTR,T 
IFIT=QTHEN125 
IFIT=XTHENX=X-1:GOTO95 
FORT=ITTOX~1:A$(T) =AS$ (T 
+1) :NEXTT: X=X-1:GOTO95 
PRINT" {BLU}":FORT=1TOX: 
PRINTT;A$(T) :A$(T)=RIGH 
TS (AS$(T) ,LEN(AS(T) ) -1) 


MP 15 
RG 26 


PK 25 


EG 36 
EC 35 


XR 46 
PD 45 


Ps 56 


BG 55 
KA 66 


CR 65 
DH 76 
gM 75 
QJ 8a 
QE 85 


KS 96 
PQ 95 


EQ 196 


FS 165 
KA 119 
AG 115 
RP 120 


FA 125 


JULY 1992 COMPUTE G-29 


PROGRAMS 


130 BS="":FORR=1TOLEN (AS (T) 
)-1:A=ASC (MIDS (AS(T),R, 
1)) :IPA>63THENA=A~64 
BS=BS$+CHR$ (A) :NEXTR:A=A 
SC (RIGHTS (A$ (T),1)) :A=A 
+64:BS=BS+CHR$ (A) 

AS (T) =B$:NEXTT 

PRINT" {DOWN} {7}SAVE THI 
S FILE {RED}Y/N" 

GETAS$: IFAS=""THEN150 
IFAS="N"THEN19@ 
IFAS$<>"Y"THEN159 
PRINT#15,"SG:"+F$:GOSUB 
236 
OPEN2,8,2,"6:"+FS+",S,W 
":POKE781,2:SYS65481: PO 
KE786,13:SYS65490 
FORT=1T0X:FORR=1TOLEN (A 
$(T)) :AS=MIDS (A$ (T) ,R,1 
) SA=ASC (A$) : POKE786,A 
SYS65496 
NEXTR,T:CLOSE2: POKE781, 
3:SYS65481:GOSUB238 
PRINT" {DOWN} {3}FINISHED 
" 

PRINT" {DOWN}{7}DO ANOTH 
ER FILE {RED}Y/N" 
GETAS: IFAS=""THEN200 
IFAS="Y"THEN29 
IPAS="N"THENCLOSE15:END 
GOTO298 
PRINT" {DOWN} {BLU} FOUND 
{SPACE}A MATCH! {RED}"; 
CHRS (34) ;A$(R) ;CHRS (34) 
7" {BLU}";T;"{RED}& 
{BLU}";R 

Z=T: IT=R:T=X:R=X: RETURN 
INPUT#15,EN,EMS,ET,ES 
PRINT" {DOWN} {RED} "EN;EM 
$;ET;ES: IFEN>1THENCLOSE 
15:STOP 

RETURN 


135 


146 
145 


156 
155 
168 
165 


176 
175 


186 
185 


199 
195 


266 
265 
218 
215 
226 


225 
2306 
235 


MF 240 


Daniel Lightner programs and raises 
Himalayan cats in Sidney, Montana. 


ALPHABETIZER 


By Todd Piltingsrud 
As many 64 and 128 programmers 
know from experience, original and pub- 
lic domain programs can quickly fill up 
your disk library. Finding a desired file is 
no problem when there are only a few pro- 
grams on a disk, but when file after file 
scrolls by during a directory listing, it can 
be a hassle. Wouldn't it be easier if all 
files were in alphabetical order? 
Alphabetizer was written as a solution 
to that problem. It reads a disk directory, 
reorganizes it, and then saves it back to 
disk in alphabetical order. The directory 
stays in alphabetical order until you add 
additional files or programs. 
Alphabetizer consists of two pro- 


G-30 COMPUTE JULY 1992 


grams. The main program is in BASIC. To 
help avoid typing errors, enter it with The 
Automatic Proofreader. See “Typing 
Aids” elsewhere in this section. Be sure 
to save a copy of the program before you 
exit Proofreader. 

This program loads a short machine 
language program. You'll have to use 
MLX, our machine language program, to 
enter it. Save it with the name ALPHA.ML, 
as this is the name used by the BASIC pro- 
gram. When MLX prompts, respond 
with the following values. 


Starting address: C000 
Ending address: C147 


Putting Disks in Order 

Using Alphabetizer is simple. After run- 
ning it, select a disk you want to alpha- 
betize and place it in the drive. Press 
A to alphabetize it or press D to see its 
directory. When you have finished, 
press Q to quit. 


ALPHABETIZER 


CP 1 REM COPYRIGHT 1992 ~ COMP 
UTE PUBLICATIONS INTL LTD 
- ALL RIGHTS RESERVED 
5 IFPEEK (49152) <>16@THENLOA 
D"ALPHA.ML",8,1 
16 PRINT"{CLR}"TAB(11)" 
{DOWN} {AP AAAARRR RRR RRR 
¢s}" 
PRINTTAB(11)"-A ~ ALPHAB 
ETIZE-":PRINTTAB (11) "-D 
{SPACE}~ DIRECTORY 
{2 SPACES}-" 
PRINTTAB(11)"-Q - QUIT 
{7 SPACES}~":PRINTTAB (11 
)"{ZPRRRRRR HR RH RH REREX SN 
POKE56, 142:CLR:DIMFPS$ (14 
4) ,SP$(144) ,SS%(144) 
GETA$: IFAS="A"THENSG 
IFAS="D"THENSYS49411:GOT 
0680 
IFAS<>"Q"THEN3G 
PRINT" {CLR}"; :END 
PRINT"{DOWN}READING DIRE 
CTORY"; :OPEN1,8,15,"I":G 
OSUB66G:CLOSE1] 
SYS49152:11=PEEK(7):PRIN 
TI1"FILES" 
PRINT" {DOWN}ALPHABETIZI 
NG": FORT=1TOI1:SP$(T)=S 
PS$(T)+FPS$(T) :NEXT 
N=I1:LI=1:B (LI) =N+1:M=1 
J=B (LI): I=M-1: IFJ-M<3TH 
EN366 
MI=INT ((I+J) /2) 
I=I+1: IFI=JTHEN326 
IFSP$ (I) <=SP$ (MI) THEN27 
6 
J=J-1: IFI=JTHEN320 


CG 


QB 


HQ 26 


HS 25 


27 


38 
46 


66 
76 
86 
96 
236 
246 
256 
266 
276 
286 


296 


366 
316 
328 
336 
346 
358 
366 
378 
386 
3968 


408 


416 


426 
436 
449 
458 
460 
476 
486 
496 
506 
516 
526 


536 
540 


556 


560 
668 


676 
680 


696 


766 


IFSPS$ (J) >=SP$ (MI) THEN29 
g 
SPS=SP$(I):SP$(I)=SPS$(J 
) :SP$ (J) =SP$:GOTO276 
IFI>=MITHENI=I-1 
IFJ=MITHEN350 
SPS$=SP$(I):SP$(I)=SP$(M 
I) :SP$ (MI) =SPS 
LI=LI+1:B (LI) =I:GOTO250 
IFJ-M<2THEN396 
IFSPS$(M) <SP$ (M+1) THEN39 
6 
SPS=SPS$ (M) :SPS(M) =SP$ (M 
+1) :SP$(M+1)=SP$ 

M=B (LI) +1:LI=LI~1:IFLI> 
OTHEN250 
FORT=1T011:FP$(T)=RIGHT 
$(SPS$(T) ,5):SP$(T) =LEFT 
$(SPS$(T) ,27) NEXT 
OPEN1,8,15,"I":GOSUB66G 
:OPEN8,8,8,"#":I2=1:PRI 
NT" {DOWN}WRITING DIRECT 
ory" 

PRINT#1,"B-P"; 8; 0 
C=@:READS: IFI1-I2<8THEN 
PRINT#8 ,CHRS (@) CHRS$ (255 
)7:GOTO458 
PRINT#8,CHRS$ (18) CHRS(S) 


; 
PRINT#8,RIGHTS (FPS$(I2), 
3) ;:GOTO476 

PRINT#8,FPS (12); 
PRINT#8,SPS$ (12); 
IFI2=I1THEN5S1@ 
12=12+1:C=C+1: IFC<8THEN 
466 

READS: PRINT#1,"U2";8;0; 
18;S:GOTO420 
AS="":FORT=1T032:AS=AS+ 
CHRS (6) :NEXT 
C=C+1:IFC=8THEN546 
PRINT#8 ,AS; :GOTO526 
READS: PRINT#1,"U2"; 8; 6; 
18;S:CLOSE8:SYS49411:GO 
TO68B 

DATA 4,1,7,4,10,7,13,16 
,16,13,2,16,5,2,8,5,11, 
8,14,11,17,14,3,17,6,3, 
9,6 

DATA 12,9,15,12,18,15,0 
718 
INPUT#1,A,B$,C,D:IFA=@T 
HENRETURN 

PRINTA;BS;C;D 
CLOSE1: PRINT" {DOWN} PRES 
S RETURN" 

GETAS: IFAS<>CHR$ (13) THE 
N690 

RUN 


ALPHA.ML 


CO18:GE 
C@26:DG 
C828:62 
CO36:29 
C638:85 


68 20 EC CO 
8E 85 
c8 De 
CPE FE 
C8 DG 
91 62 
Cl 38 
A2 04 


66 
62 
06 
AS 
63 
19 
E9 
66 


85 
26 
FO 
90 
91 
co 
8D 
G2 


D8 
DD 
OF 
13 
8E 
99 
E6 
DE 


16 
2F 
Ut) 
AG 
c8 
85 
DD 
69 
95 
ag 
0) 
53 
ry) 
85 
Bl 
91 
AS 
1) 
FB 
91 
F8 
DG 
FF 
BD 
cé 
D7 
19 
AA 
84 
AS 
D7 
Da 
cc 


F9 
85 
Bl 
@2 
Bl 
3 
98 
GA 
04 
63 
75 
Do 
86 
FB 
FB 
03 
FC 
Ag 
69 
65 
Ag 
C4 
Ag 
FF 
BE. 
AA 
FA 
98 
D3 
FF 
AA 
D2 
FF 


4c 
63 
63 
18 
63 
4c 
ce 
95 
66 
18 
4 
A2 
o7 
AQ 
FG 
c8 
91 
1B 
g5 
26 
26 
66 
62 
20 
AG 
AG 
48 
A4 
26 
26 
AS 
Ag 
oo 


CG4G:CA 
CG48:A5 
CG5G:AG 
CG58:15 
CG6G:48 
CG68:68 
CG7G:G3 
CO78:G3 
CG8G:GG 
CO88:68 
CO9G:A9 
C898:DG 
CGOAG:A2 
CGA8: G6 
COBG: G2 
COB8:05 
CO6CB:CB 
COC8:AG 
CODG:A5 
COD8:FC 
COEG:A2 
CGE8:G2 
COFO:BA 
CGF8:26 
C166:4C 
C108:20 
C116:88 
C118:68 
C126:66 
C128:26 
C136:26 
C138:62 
C149:4C 


24 
85 
co 
65 
85 
c8 
18 
G4 
2c 
95 
66 
48 
co 
FC 
ao 
91 
87 
c8 
c8 
E6 
ca 
AA 
AG 
A2 
EC 
A5 
FF 
1c 
E6 
De 
04 
c3 
66 


87 
46 
48 
BS 
E8 
6D 
FS 
98 
06 
3c 
99 
7D 
G2 
CA 
B3 
51 
31 
cB 
79 
DB 
AG 
21 
55 
4F 
80 
pc 
FE 
78 
4B 
12 
8B 
2E 
1D 


Todd Piltingsrud has subscribed to Ga- 
zette for three years and has never 
seen a utility that alphabetizes a direc- 
tory. So he wrote one. He lives in New 
Richland, Minnesota. 


DUPLICATE 1541 


By Daniel Lightner 

When you want to copy files from one 
disk to another with Commodore BASIC, 
you must first load a file, swap disks, and 
then use the SAVE command. This proc- 
ess can become tedious when you copy 
a disk that contains numerous programs 
and files, 

Unlike some computers, the 64/128 
doesn't come with a built-in DISKCOPY 
command. Using a utility program to do 
the job for you is one way around this 
problem. Duplicate 1541 is just such a util- 
ity. With it and a 1541 disk drive, you can 
make exact copies of any floppy disk 
that isn't copy-protected. 


Typing It In 

Duplicate 1541 is written entirely in ma- 
chine language, but it loads and runs 
like a BASIC program. To enter it, use 
MLX, our machine language entry pro- 


gram; see “Typing Aids” elsewhere in 
this section. When MLX asks for start- 
ing and ending addresses, respond 
with the following values. 


Starting address: 0801 
Ending address: ODA8 


When you've finished typing in Dupli- 
cate 1541, be sure that you save a 
copy of the program to disk. 


Making Copies 
Before attempting to copy a disk, it's a 
good idea to place a tab over its write- 
protect notch. This is just a precaution 
in case an accident occurs during the 
copy process. 

When you run Duplicate, it'll prompt 
you to place the source disk in drive 8. 
This is the disk that you wish to copy. 
After you press the space bar, Dupli- 
cate 1541 reads the disk name and ID 
and starts reading sectors into memo- 
ry starting at track 1. When the comput- 
er's memory is filled, the program will 
prompt you to place a target disk in 
the drive. Remove the source disk, 
place a blank disk in the drive, and 
press the space bar. 

Your blank disk doesn’t have to be 
formatted; Duplicate 1541 automatical- 
ly formats it for you. To copy an entire 
disk, this process must be repeated 
three more times. You'll be prompted 
when to swap disks. 

Duplicate 1541 isn’t exactly a speed- 
ster, but it'll get the job done. To 
boost the copying speed a bit, the pro- 
gram blanks the screen and sets the 
1541 to 1540 mode. If your disk has on- 
ly a few files on it, copying them man- 
ually may be faster . 

Duplicate 1541 will inform you when 
the copying process is complete. You'll 
then be asked if you wish to make 
more copies. If you do, tap the Y key. 
Press the N key, and Duplicate 1541 
will return your computer to BASIC. 
When it has finished all of it's tasks, Du- 
plicate 1541 restores the screen and re- 
turns the drive to 1541 mode. 


DUPLICATE 1541 


9861:0B G8 C8 
G869:31 G6 GG 
@811:D9 8D 21 
@819:FE 85 G1 
@821:CC FF AQ 


36 
26 
29 
26 
26 


9E 
rt) 
78 
20 
8D 


32 
oo 
AS 
91 
B2 


30 
8D 
61 
@B 
G2 


76 
3A 
A3 
2D 
2a 


07 
a6 
DG 
58 
26 


@831:6F 
9839:B9 
G841:6B 
9849:20 
G851:93 
G859:A8 
G861:AE 
9869:00 
O871:FO 
G879:12 
0881:E8 
G889:93 
G891:34 
G899:E3 
G8A1:43 
@8A9:C3 
@8B1:20 
@8B9:20 
G8C1:0A 
@8C9:99 
@8D1:01 
@8D9:EC 
@8E1:EB 
@8E9:EB 
@8F1:EB 
@8F9:20 
G9G1:26 
6969:206 
@911:29 
@919:GA 
@921:09 
G929:69 
9931:05 
9939:06 
9941:69 
9949:6F 
9951:B9 
6959:67 
@961:FF 
@969:A2 
@971:CF 
G979:F6 
G981:6A 
9989:CB 
@991:C7 
@999:4C 
G9A1:69 
G9A9:2G 
99B1:93 
G9B9:A8 
GOIC1:AE 
G9C9:88 
G9D1:96 
G9D9:26 
@9E1:A9 
G9E9: 00 
@9F1:CO 
G9F9:AE 
GAG1:F9 
@AG9:CB 
@A11:C7 
@A19:4C 
GA21:99 
@A29:CF 
GA31:61 
@A39:CF 
GA41:A9 
GA49:A5 
GA51:6D 


JULY 1992 COMPUTE 


ca 
08 
26 
20 
26 
AG 
AG 
co 
03 
38 
8E 
26 
20 
20 
6B 
6B 
E3 
43 
A2 
26 
20 
20 
20 
OB 
6B 
6B 
OB 
E3 
43 
43 
A2 
A2 
4c 
Ag 
oo 
co 
AE 
F9 
20 
Da 
3c 
cD 
cD 
GA 
43 
G8 
26 
26 
26 
AG 
co 
EE 
FF 
AG 
c8 
26 
De 
cD 
cD 
GA 
A2 
8D 
69 
8D 
FF 
20 
Da 
co 


59 
71 
26 
9c 
95 
BF 
7A 
F9 
D6 
46 
CA 
22 
46 
@D 
59 
1D 
GE 
99 
59 
BG 
1lF 
56 
24 
DB 
E5 
D2 
Fl 
92 
A2 
B2 
8A 
32 
86 
3c 
6E 
Fl 
8B 
45 
18 
5c 
66 
77 
64 
7A 
83 
18 
DA 
B4 
E7 
7E 
cc 
68 
B2 
4D 
OB 
EG 
6D 
63 
DA 
F3 
65 
99 
93 
B7 
45 
E7 
86 
cD 
58 
6A 


G-31 


PROGRAMS 


GA59:30 
GA61:FF 
GA69:FF 
@A71:F5 
@A79:FF 
@A81:6D 
GA89:FF 
GA91:62 
GAI9:E5 
GAA1:6E 
GAA9: BA 
@AB1:A8 
@AB9:A9 
@AC1:A9 
GAC9:FB 
@AD1:62 
GAD9: 66 
GAE1:FC 
GAE9:85 
GAF1:B9 
@AF9:2C 
@BO1:D0 
GBG9:AG 
@B11:C8 
@B19:20 
@B21:8D 
@B29:A9 
6B31:60 
@B39:CO 
@B41:62 
0B49:10 
@BS1:FF 
@B59:A0 
@B61:C8 
@B69:20 
@B71:20 
GB79: 20 
@B81:4E 
GB89:79 
GB91:AG 
@B99:CB 
GBA1:A2 
GBA9: G2 
@BB1:4C 
GBB9:A9 
@BC1:37 
@BC9:8D 
@BD1:AG 
@BD9:08 
@BE1:FF 
@BE9:GA 
@BF1:8D 
GBF9:G2 
@CO1:CF 
GCO9:66 
@C11:65 
6C19:G2 
GC21:GC 
6C29:0F 
9C31:56 
GC39:98 
gC41:8D 
GC49:AD 
@c51:61 
@C59:GA 
GC61:8C 
9C69:62 
@C71:262 
@C79:12 
@C81:19 


G-32 


FO 
G2 
G2 
CA 
64 
G2 
26 
BL 
1A 
23 


1F 
Ut) 


AB 
AG 
c8 
Ag 
26 
AQ 
AG 
c8 
68 
62 
B9 
BG 
FF 
gc 
FF 
18 
FC 
85 
46 
D2 
E4 
6B 
6c 
FS 
1l 
68 
26 
26 
4c 
AD 
Ag 
B9 
6c 
iE) 
6G 
ce 
i) 
59 
FC 
6D 
FS 
26 
62 
4E 
63 
34 
34 
FF 
BA 
c3 
6c 
7D 
8D 
6c 
8E 
A2 
B3 
FD 
AD 
62 
cg 
BS 
65 
c4 
E8 
BO 
4 
66 
68 
I) 


COMPUTE JULY 1992 


Cl) 
23 
31 
32 
32 
26 
20 
6D 
1c 
9A 
26 
56 
41 
55 
45 
26 
45 
26 
26 
4F 
26 
26 
4F 
56 
@D 
56 
31 
43 
54 
20 
26 
54 
54 
26 
48 
52 


14 
55 
38 
26 
26 
36 
36 
9A 
53 
44 
44 
52 
43 
54 
54 
49 
26 
53 
26 
4D 
21 
4D 
54 
59 
96 
4c 
35 
4F 
26 
43 
56 
49 
4c 
41 
54 
56 


14 
31 
26 
31 
36 
26 
55 
26 
4F 
49 
52 
45 
45 
26 
26 
4E 
1c 
58 
43 
58 
21 
41 
48 
3F 
93 
49 
34 
58 
31 
4F 
55 
4P 
26 
4c 
53 
45 


14 
26 
38 
34 
20 
42 
49 
26 
55 
53 
49 
53 
6D 
1c 
9A 
20 
56 
41 
4F 
4c 
21 
4B 
45 
26 
@D 
43 
31 
59 
39 
4D 
42 
4E 
4c 
4c 
26 
44 


12 
32 
42 
34 
55 
2D 
2D 
58 
52 
4B 
56 
53 
9A 
54 
44 
44 
52 
43 
56 
45 
@D 
45 
52 
1c 
26 
41 
@D 
52 
39 
58 
4c 
53 
54 
26 
52 
@D 


1l 
26 
2D 
55 
32 
56 
55 
55 
43 
26 
45 
26 
26 
41 
49 
52 
45 
45 
59 
54 
@D 
26 
20 
59 
20 
54 
9A 
49 
32 
55 
49 
20 
44 
52 
45 
@D 


ahh 
30 
56 
ie 
26 
26 
49 
54 
45 
49 
26 
53 
29 
52 
53 
49 
53 
@D 
20 
45 
9A 
41 
43 
2F 
44 
45 
26 
47 
@D 
54 
43 
49 
@D 
49 
53 
EA 


6C89: 68 
GC91:10 
9C99:26 
@CA1:26 
GCA9: 26 
@CB1:32 
GCR9: 32 
@CC1: 2B 
@CC9:26 
@6CD1: 28 
@CD9:4E 
@CE1:1C 
GCE9:50 
@CF1:56 
@CF9:47 
0D01:4B 
6D09:56 
6D11:53 
@D19:96 
@D21:43 
@D29:44 
@D31:20 
6D39:4E 
OD41:4F 
6D49:4E 
@D51:55 
@D59:26 
@D61:26 
@D69: 48 
@D71:26 
@D79:45 
@D81:41 
6D89:4E 
@D91:26 
@D99:47 
@DA1:45 


Daniel Lightner is a regular contributor 
who lives in Sidney, Montana. 


RAILROAD SOLITAIRE 


By Donald G. Klich 
Have you ever been caught up in a sim- 
ple game that’s so challenging that you 
have a hard time turning it off? Railroad 
Solitaire for the 128 is just such a game. 
This card game for one person was 
originally created to be used as a pas- 
time while traveling by train, since little 
space was available for conventional 
games of solitaire. The object of the 
game is ultimately to discard the entire 
deck while working with only the four cur- 
rently dealt cards. 


Typing It In 

Railroad Solitaire is written entirely in BA- 
SIC 7.0 and works with a 40-column 
screen. To help avoid typing errors, en- 
ter it with The Automatic Proofreader; 
see “Typing Aids” elsewhere in this sec- 
tion. Be sure to save a copy of the pro- 
gram before you exit Proofreader. 


Playing a Hand 

You may discard the middle two 
cards of the set of four that appear 
onscreen if the bracketing cards 
are of the same suit or value. If all 
four cards match in suit or value, 
then all four can be discarded, If 
you can't play, you must request an- 
other card. This card is placed at 
the right-hand side of the screen, 
and the card on the left is moved 
offscreen and temporarily “lost.” 
When discards occur, lost cards 
from the left move back to fill the 
spaces. If you're lucky enough to 
have insufficient lost cards to fill in 
from the left, new cards will be 
dealt to fill in from the right. 

Onscreen prompts will tell you 
which keys to press to discard or re- 
quest cards. Unlike solitaire played 
with actual cards, this computerized 
version won't let you cheat or make 
an improper move. 

When you've gone through the 
deck, discarding all that you can, 
the game will end, and you'll be in- 
formed of any remaining cards. 
You'll then have the opportunity to 
play again and better your score, 

Be prepared for long hours of 
play to beat the odds. It took the au- 
thor an hour to win, just so he 
could test all the logic involved. 


RAILROAD SOLITAIRE 


EQ 16 REM COPYRIGHT 1992 ~ COM 
PUTE PUBLICATIONS INTL L 
TD ~ ALL RIGHTS RESERVED 


PR 26 REM S$ CONTAINS SUIT CHA 
RACTERS 

MJ 36 REM SS$ CONTAINS SUIT PI 
XELS 

KH 4@ REM C CONTAINS SUIT COLO 
RS 

CX 58 REM VS CONTAINS CARD LAY 
OUT DATA 

SB 6@ REM DN CONTAINS DECK CAR 
D VALUES 

FJ 78 REM DS CONTAINS DECK CAR 
D SUITS 

BF 8@ REM WN CONTAINS WORK CAR 
D VALUES 

KB 98 REM WS CONTAINS WORK CAR 
D SUITS 

GH 100 REM DP/WP ARE THE DECK/ 


WORK POINTERS 

119 DIMS$(4) ,V$(13) ,DN(52), 
DS (52) ,WN(52) ,WS(52):TS 
=52:0=0 

126 C(@)=11:C(1)=1:C(2)=11: 
C(3)=1:C(4) =2 


long 


QH 


GQ 


GB 


QG 
HE 
MH 
EP 
FQ 
AD 


HS 


JG 


SA 


BF 


FA 
RK 
KE 
MJ 
BE 


SH 


DB 


HA 


KK 


MQ 
QG 


136 


146 


156 
166 
176 
186 
196 
208 


216 


226 


236 


248 


256 
266 
276 
286 


296 


366 


316 
328 


336 
346 


350 


368 
376 


S$ (@) =CHR$ (154) :S$(1)=C 
HRS (152) :S$(2) =CHRS (147 
) :8$ (3) =CHR$ (129) :S$(4) 
=CHRS$ (64) 
FORI=6TO51STEP13:FORJ=0 
T012:DN(I+J) =J:DS(I+J)= 
1/13:NEXTJ:NEXTI 
V$(G)="A 63681656563236 
" 


V$(1)="2 04681656563216 
3256" 
V$(2)="3 @50681656563216 
32563236" 
V$(3)="4 66681656562416 
461624564056" 
V$(4)="5 67081656562416 
4016245640563236" 
V$(5)="6 68681656562416 
46162456405624364036" 
V$(6)="7 69681656562416 
46162456405624364036324 
6" 
V$(7)="8 16081656562416 
40162456405624364036324 
63227" 
v$(8)="9 110681656562416 
46162456405624294029244 
340433237" 
V$ (9) ="1612681656562416 
40162456405624294029244 
3404332223250" 
v$(10)="J3. 6268165656" 
vS(11)="Q 6268165656" 
v$(12)="K 6268165656" 
v$(13)="{2 SHIPT-SPACE} 
aa" 
COLORG, 2:COLOR1,1:COLOR 
4,2:GOSUB840:WIDTH2:GRA 
PHIC2,1,21 
FORI=6T03:CHAR1,@,16,S$ 
(1) :DRAW1,3,82T04, 82704 
, 83103, 83: SSHAPESSS (I) , 
6,80,7,87:NEXTI:CHAR1,6 
ig," * 
REM ****SHUFFLE DECK 
PRINT" {BLK}{7 SPACES}I' 
M SHUFFLING THE DECK":F 
ORI=1T0166:F=INT (RND(1) 
*51) :T=INT (RND(1)*51) :B 
N=DN (F) :BS=DS (F) :DN(F) = 
DN(T) :DS (F) =DS (T) :DN(T) 
=BN:DS (T) =BS:NEXTI 
REM ****INITIAL SETUP 
FORDP=@T03:WN (DP) =DN (DP 
) :WS (DP) =DS (DP) :NEXT: WP 
=DP:GOSUB770 
PRINT" {BLK}ENTER {CYN}C 
{BLK}T0 RECEIVE A CARD 
“":PRINT"ENTER {CYN}2 
{BLK}TO DISCARD THE MID 
DLE CARDS": PRINT"ENTER 
{SPACE}{CYN}4 {BLK}TO D 
ISCARD ALL CARDS":IFDP> 
52THEN57@ 
GETKEYZ$:1FZ$<>"C"THEN4 
20 
IFDP=52THENS76:ELSE:GOS 
UB466:GRAPHIC2,1,21:GOS 
UB776:GOTO350 


RB 


EP 


DR 


BH 


GQ 


380 
396 
408 


416 


426 
436 


440 
456 
466 


476 
486 
496 
548 
516 
520 
536 
546 


556 
566 


576 


586 
596 


660 
610 
620 


638 
646 
656 
660 


6708 


680 


REM ****ROUTINE TO READ 
A CARD 
IFDP>=52THENWN (WP) =13:W 
S (WP) =4:WP=WP+1: RETURN 
WN (WP) =DN (DP) :WS (WP) =DS 
(DP) :DP=DP+1:WP=WP+1:RE 
TURN 
REM ****ROUTINE TO REMO 
VE MIDDLE CARDS 
IFZS<>"2"THEN47@ 
IFWN (WP-4) =WN (WP~1) THEN 
456 
IFWS (WP-4) <>WS (WP-1) THE 
NSOUND1,4000,5:GOTO356 
WN (WP~3) =WN (WP-1) :WS (WP 
-3) =WS (WP-1) :WP=WP-2 
IFWP>3THENGRAPHIC2,1,21 
:GOSUB770:GOTO350:ELSEG 
OSUB396:GOTO468 
IFZ$<>"4"THENSOUND1, 468 
@,5:GOTO350 
REM ****ROUTINE TO REMO 
VE ALL FOUR CARDS 
IFWN (WP-4) <>WN (WP-3) THE 
N526 
IFWN (WP-3) <>WN (WP-2) THE 
N520 
IFWN (WP-2) =WN (WP-1) THEN 
WP=WP-4:GOTO469 
IFWS (WP-4) <>WS (WP-3) THE 
N556 
IFWS (WP~3) <>WS (WP~2) THE 
N556 
IFWS (WP~2) =WS (WP-1) THEN 
WP=WP-4:GOTO46G 
SOUND1,4066,5:GOTO356 
REM *****SAVE SCORE ROU 
TINE 
SOUND1,8600,5:PRINT" 
{BLK}GAME OVER. YOU HAD 
";WP-Q;" CARDS REMAINI 
NG": IFWP-Q<TSTHENTS=WP— 


Q 

PRINT"YOUR BEST SCORE I 
: ‘ems 

PRINT"PLAY AGAIN? Y 
aN": GETKEYZ$: 1FZ$="Y"TH 
ENGRAPHIC2,1,21:GOT0320 
IFZ$="N"THENEND: BLSE570 
REM ****DISPLAY A CARD 
COLOR1,C(S) :CHAR1,X+1,¥ 
+1,MIDS$ (V$(V) ,1,2) :IEFV= 
OTHENCHAR1, X+6,Y+8 ,MIDS 
(VS (V) 1,2) :ELSECHAR1,X 
+7,¥+8 MIDS (V$(V),1,2) 
X=X*B:Y=¥*8 
FORI=@TO ( (VAL (MIDS (V$ (V 
),3,2)))-1) *4STEP4 
GSHAPESS$(S) ,X+VAL (MIDS 
(VS (V) ,5+1,2)) ,Y+VAL (MI 
DS(VS$(V),7+1,2)) :NEXTI 
COLOR1,1:BOX1,4+X,4+Y,6 
7+X,75+Y:COLOR1, 8: IFV<> 
1OTHEN698 

CIRCLE], 36+X,40+Y,12,16 
190,270:CIRCLE1,36+X,40 
+¥,4,8,90,276 

DRAW1, 40+X,40+YTO4G+X,2 
4+Y¥TO48+X,24+YTO48+X, 40 


GR 
HM 


HH 


CG 
BP 


DE 


sx 


BS 


MM 


SG 


DM 
BP 


FD 


XM 


FF 


AB 


AB 


FC 


696 
708 


716 


726 
736 


748 


756 
766 
776 


786 


796 
808 


819 
820 


830 


846 


858 


860 


+¥:DRAW1, 24+X,40+YTO32+ 
X,40+¥:PAINT1,28+X,44+¥ 
:GOTO756 
IFV<>11THEN726 
CIRCLE], 36+X,40+Y,12,16 
:CIRCLE1], 36+X,40+¥,4,8: 
PAINT1, 28+X,40+¥ 
DRAW1, 36+X,54+YTO40+X,6 
6+YTO47+X, 60+YTO39+X,51 
+¥:PAINT1,44+X,58+¥:GOT 
0758 
IFV<>12THENRETURN 
DRAW1, 24+X,56+YTO24+X,2 
4+YTO32+X,24+¥TO32+X,56 
+¥TO24+X,56+Y¥:PAINT1, 28 
+X,28+Y:DRAW1, 32+X, 36+¥ 
TO4G+X, 244+¥TO48+X, 24+¥T 
032+X,44+Y¥:PAINT1,44+X, 
26+Y 
DRAW1, 32+X,36+YTO4G+X,5 
6+YTO48+X, 56+YTO36+X, 32 
+¥:PAINT1,40+X,48+Y 
WIDTH1:BOX1,19+X,16+Y¥,5 
2+X,63+Y:WIDTH2: RETURN 
REM ****DISPLAY THE WIN 
Dow 
FORZ=G6T03: V=WN (WP-4+Z) = 
S=WS (WP-4+2Z) :X=10*Z:Y=5 
: IFV=13THENQ=Q+1 
GOSUB626:NEXTZ: IFQ=4THE 
N82¢ 
IFQ<>2THENRETURN 
IFWN (WP-4) =WN (WP-3) THEN 
826 
IFWS (WP-4) =WS (WP-3) THEN 
826 
PRINT"{5 SPACES}YOU WIN 
11111":SOUND1,16000,5:G 
o0T059¢ 
REM ****GAME INSTRUCTIO 
NS 
GRAPHICG,1: PRINT" {RED} 
{5 DOWN}{11 SPACES}RAIL 
ROAD SOLITAIRE": PRINT" 
{BLU} {2 DOWN}THIS GAME 
{SPACE}WAS INVENTED FOR 
PLAYING ON A":PRINT"TR 
AIN WHERE SPACE TO SPRE 
AD OUT IS RARE." 
PRINT" {DOWN} THE IDEA O 
F THE GAME IS TO DISCAR 
D THE":PRINT"CARDS THAT 
ARE BETWEEN END CARDS 
{SPACE}OF THE":PRINT"SA 
ME VALUE OR SUIT. 
{2 SPACES}ALL FOUR CARD 
S CAN" 
PRINT" BE DISCARDED IF 
{SPACE}THEY ARE OF THE 
{SPACE} SAME": PRINT" VALU 
E OR THE SAME SUIT.":PR 
INT" IF THERE IS NO PLA 
Y GET THE NEXT CARD.":P 
RINT"{3 DOWN}PRESS ANY 
{SPACE}KEY TO START" 


EH 870 GETKEYZS:RETURN 


Donald G. Klich lives in Mount Pros- 
pect, Illinois. 


JULY 1992 COMPUTE G-33 


PROGRAMS 


a ES EN IY ENS OIA SY 5 TIENT STG ERIN SET EL! 


128 GRAPHIC DUMP 


Donald G. Klich 
Here are two programs similar to the 128 
text screen dumps submitted by Bruce 
Bowden (Screen Dump 128, December 
1991). Rather than working with text, how- 
ever, these programs will dump bitmap- 
ped graphic screens to your printer. 
While you can't scale the pictures you 
send toa printer, you may select either of 
two different-sized printouts. Graphic 
Small prints a picture that is 40 x 25 
characters in size, and Graphic Large 
prints one 80 x 50 characters. Both of 
these utilities are easy to install and use. 
They're also fairly short, so it won't take 
you long to type them in. 


Typing It In 
Graphic Small and Graphic Large are 
both written in BASIC. To help avoid typ- 
ing errors, enter the programs with The 
Automatic Proofreader; see ‘Typing 
Aids" elsewhere in this section. Be 
sure to save copies of your programs 
before exiting Proofreader. 


Printing Pictures 

Load and run either program as you 
would a normal BASIC program. When 
you run either program, there will be a 
slight pause, and then the READY 
prompt will return. The programs use 
function keys f1, f2, and f3 and put ma- 
chine language code in locations $1300- 
$13AS. After you run one of the pro- 
grams, you can then load and run an 
application that contains a graphic 
screen. When you reach the point that 
you'd like a printout of the screen, 
press the Stop key. Make sure your print- 
er is turned on and ready. 


Small Pictures 

If you're using Graphic Small, proceed 
by pressing f1. (Be sure your printer is 
turned on and ready.) The screen will 
be garbled and then go blank. At this 
point, press f2. Shortly after that, your 
picture will start to print. When the print- 
out is complete, the picture onscreen 
will be ungarbled. 


Large Pictures 

To use Graphic Large, load and run 
the program and then run your graph- 
ics program as above. Press f1 and f2 
to start the printing process, but press 


G-34. COMPUTE JULY 1992 


f3 when the printing is complete to re- 
turn to the applications program. You 
can continue with your graphics pro- 
gram by entering a CONT command. 

These programs have been tested 
only on a Seikosha SP1000A and an Ep- 
son FX-80 printer, but they should 
work on other graphics printers, too. 
Make sure any printer interface you 
may be using is set for transparent 
mode. 

For those interested in modifying 
these programs for other printers, two 
printer-control commands are used in 
lines 60 and 70 in Graphic Small. The 
first instructs the printer to suppress 
the vertical spacing between lines, and 
the second precedes each print-line 
set to instruct the printer to print in 
graphics mode. Note that abbreviated 
commands (uppercase characters) are 
used at times so that the required BA- 
SIC code will fit in the special area re- 
served for function key definitions. 


GRAPHIC SMALL 


EQ 10 REM COPYRIGHT 1992 - COM 
PUTE PUBLICATIONS INTL L 
TD ~ ALL RIGHTS RESERVED 
REM GRAPHIC SCREEN PRINT 
ER FOR COMMODORE 128 

REM THIS PROGRAM, ONCE A 
CTIVATED WILL DUMP THE C 
URRENT GRAPHICS SCREEN 
REM TO THE PRINTER DEVIC 
E 4.{2 SPACES}IT IS ACTI 
VATED BY THE Fl AND F2 K 
EYS, 

REM IN A 40 BY 25 CHARAC 
TER DISPLAY 
KEY1,"OP1,4:PR1,CH(27)CH 
(65) CH (8): SY¥S4864:FAST"+ 
CHRS (13) 
KEY2,"FOA=8192T016191STE 
320: PR1,CH(27)CH(42)CH(4 
)CH (64) CH (1) ;:FOB=6T0319 
:PR1,CH (255-PEE (A+B) 
RL: NE: SLOW: SYS4864:CL 
O1:END"+CHRS (13) 
KEY3,""sKEY4,"":KEY5,""s 
KEY6,"":KEY7,"":KEY8,"" 
FORQ=4864T04987:READZ$:P 
OKEQ,DEC(Z$) :NEXT 

GB 166 DATA 18,96,13,00,06,06, 
66,60,08,00,00,18,18,18 
,FF,FF,18,18,18,86,00,0 
6,A9,00,85,FB,A9,26,85, 
FC,AG@,@8,A2,00,B1,FB,99 
,03,13,C8,C@,08,D0,F6,A 
6,00,18,AD,15,13 

DATA 1E,03,13,69,00,E8, 
EG,@8,F0,07,0A,8D,15,13 
,4C,2E,13,99,0B,13,A2,0 
@,8E,15,13,C8,CG,08,D6, 


CG 26 


SK 30 


Ix 46 


AB 50 


SM 66 


JX 76 


GC 86 


EB 908 


HP 116 


DE,A2,06,A9,06,B9,0B,13 
,91,FB,EA,C8,CG,08,D6,F 
5,A9,06,18,A9,98 

DATA 65,FB,85,FB,A9,@0, 
65,FC,85,FC,C9,3F,D0,07 
1A5,FB,C9,40,D6,01,60,4 
C,22,13 


GRAPHIC LARGE 


EQ 16 REM COPYRIGHT 1992 ~ COM 
PUTE PUBLICATIONS INTL L 
TD - ALL RIGHTS RESERVED 
REM GRAPHIC SCREEN PRINT 
ER FOR COMMODORE 128 
REM THIS PROGRAM, ONCE A 
CTIVATED WILL DUMP THE C 
URRENT GRAPHICS SCREEN 
REM TO THE PRINTER DEVIC 
E 4, IT IS ACTIVATED BY 
{SPACE}THE Fl, F2 AND F3 
KEYS 
REM IN A 8@ X 5@ CHARACT 
ER DISPLAY 
KEY4,"":KEY5," 
KEY7,"":KEY8, 
KEY1,"OP1,4:PR1,CH(27)CH 
(65)CH (8): SYS4864:FAST:A 
$=CH (27) +CH (42) +CH (4) +CH 
(128) +CH (2) :D=252:E=251:, 
F=255"+CHRS (13) 
KEY2,"FOA=8192T016191STE 
326: FOC=1T02: PR1,CH (13); 
OB=GT0319:POKE, (F-P 
EE (A+B) ) : POK253,C:SYS498 
8:PR1 ,CH (PEE (D)); 7CH (PEE ( 
D))7:NEB,C, AN +CHRS (13) 
KEY3, "SLOW: SYS4864: cLol" 
+CHR$ (13) 
JP 108 FORQ=4864T05629:READZS: 
POKEQ, DEC (Z$) :NEXT 
DATA 18,90,13,00,00,00, 
66,60,06,00,00,18,18,18 
,FF,FF,18,18,18,00,00,0 
6,A9,00,85,FB,A9, 20,85, 
FC,AG,06,A2,06,B1,FB,99 
193,13,C8,C6,68,D0,F6,A 
6,00,18,AD,15,13 
DATA 1E,63,13,69,00,E8, 
EG,08,F6,07,8A,8D,15,13 
,4C,2E,13,99,6B,13,A2,6 
G,8E,15,13,C8,C0,08,D0, 
DE,A2,00,A0,08,B9,0B,13 
191,FB,EA,C8,C0,68,D0,F 
5,A0,00,18,A9,08 
DATA 65,FB,85,FB,A9,06, 
65,FC,85,FC,C9,3F,D0,07 
1A5,FB,C9,48,D6,61,60,4 
C,22,13,A5,FD,C9,01,FG, 
98,96,FB,06,FB,06,FB, G6 
+FB,A9,06,85,FC,A2,04,1 
8,86,FB,98,06,A9 
DATA 93,05,FC,85,FC,CA, 
FO,97,06,FC,06,FC,18,96 
1EB, 66 


SM 126 


CG 29 
SK 38 


EA 46 


RC 58 


FG 66 sKEY6,""s: 


ES 76 


KE 88 


BS 96 


cG 116 


DE 126 


JP 136 


FD 146 


Donald Klich, who lives in Mount Pros- 
pect, Illinois, is the 128 programmer 
who wrote Railroad Solitaire. 


QUIZ WIZ 


By Rizwaan Ahmed Khan 

Quiz Wiz is a program for creating mul- 
tiple-choice quizzes on the 64. The pro- 
gram is so easy to use that even a begin- 
ner can use it without reading the instruc- 
tions. Just select the menu options. 

Quiz Wiz lets the parent or teacher en- 
ter questions and answers on a variety of 
subjects. The program then creates a 
quiz in multiple-choice format with the cor- 
rect answer and three wrong answers for 
each question. It provides the correct an- 
swers and a score when the student fin- 
ishes the quiz. 

When you enter a question and an- 
swer, you aren't required to supply three 
possible answers as alternate choices. 
The program asks the question and 
then supplies the correct answer along 
with three other choices that it selects at 
random from the other answers you've en- 
tered. The correct answer is never in a pre- 
dictable location. 


Entering the Program 

Quiz Wiz is written entirely in BASIC. 
To help avoid typing errors, enter it 
with The Automatic Proofreader; see 
“Typing Aids” elsewhere in this sec- 
tion. Be sure to save a copy of the pro- 
gram before you exit Proofreader. 


Make New Entries 

When you first run the program, select 
the option to make new entries. You're 
then prompted to choose a subject. If 
the subject you want isn't on the 
screen, press the Up Arrow key and de- 
fine the subject of your choice. 

You may then enter questions and an- 
swers. Each question and answer is al- 
lowed a maximum of 80 characters. To 
exit during the input process, press the 
@ key and then press Return. 


Continue Making Entries 

Note the menu. If you wish to continue 
making entries, select the appropriate 
choice. If you select the option to 
make new entries, all work in memory 
will be erased. 


Correction Mode 

You can flip through your entries by 
pressing the < and > keys. When you 
find the question you want, press Re- 
turn, and a small menu will appear. 


This menu will allow you to fully edit or 
delete your entries. In this mode, you 
can rename the topic chosen by press- 
ing the R key. 

In correction mode you cannot enter 
the main menu by pressing the @ key. 
In this mode, you can use the cursor 
keys for more editing potential. After 
you've made any corrections, press Re- 
turn to exit to the main menu. 


Saving Files 

When you've entered a minimum of 
four questions and their answers, you 
may then save your file. Save files by 
selecting that option from the main 
menu. If you try to save a file with a 
name that is already on the disk, the 
earlier version will first be scratched. 


Loading Files 

Load a saved file into memory anytime 
you want to take a quiz. Any entries 
that may still be in memory will be 
erased. After loading, you're automat- 
ically quizzed in multiple-choice format. 
To see a directory at any time, press 
the D key. 


Scratching Files 

Select this option from the main menu 
to erase any file on disk. You need on- 
ly enter the filename to have the pro- 
gram erase it. 


Quiz Time 
A quiz begins right after loading, but if 
you've entered at least four questions, 
you can take a test immediately. Press 
the Commodore key; then press the let- 
ter next to the answer of your choice. 
If you answer incorrectly, the correct 
answer will be displayed for a short 
time. At the end of the quiz, your mis- 
takes will again be displayed. You can 
flip through them by pressing Return. 
This process lets you review your er- 
rors for as long as you wish. After re- 
viewing the final mistake, the comput- 
er will display your score. You may 
then exit to the main menu by pressing 
f1 or take the quiz again by pressing 
the Commodore key. 


Adding New Entries 

You can exit the quiz at any time by 
pressing f1. To enter more questions, 
select the option from the menu to con- 
tinue making entries. 


Tape Support 

Users with tape drives can easily alter 
the program to suit their needs. 
Change the OPEN commands in lines 
390 and 1007 to tape format. Then de- 
lete lines 62, 80, 915, 930, 935, 980, 
982, 985, 986, 987, 990, 992, 993, 
995, and 997. These lines contain the 
routines for calling the disk directory 
and for scratching files. 


QUIZ WIZ 


ME 8 REM COPYRIGHT 1992 COMPUT 
E PUBLICATIONS INTL LTD - 
ALL RIGHTS RESERVED 
DIMDS (286) :DIME$ (200) :DIM 
FS (49) : PRINTCHRS (8) : PRIN 
TCHRS (14) 
PRINT" {CLR} {WHT}{2 DOWN} 
{4 SPACES}{RVS} 
{11 SPACES}{YEL}QUIZ WIZ 
{WHT}{14 SPACES}":PRINT" 
{6 SPACES}MENU:" 
XD 10 PRINT" {DOWN}{6 SPACES} 
{YEL}{RVS}PRESS (1) TO M 
AKE NEW ENTRIES.":POKES3 
281,2:POKE53280,6 
IFES (4) <>""THENPRINT" 
{DOWN}{6 SPACES} {RVS} 
{YEL}PRESS (2) TO SAVE E 
NTRIES." 
PRINT" {DOWN}{6 SPACES} 
{RVS}{YEL}PRESS (3) TO L 
OAD ENTRIES.":IFES(1)="" 
THEN3G 
PRINT" {DOWN} {6 SPACES} 
{RVS}{YEL}PRESS (4) TO C 
ONTINUE{OFF}{19 SPACES} 
{RVS}MAKING ENTRIES." 
IFES (1) <>""THENPRINT" 
{DOWN}{6 SPACES}{RVS} 
{YEL}PRESS (5) FOR CORRE 
CTION MODE." 
PRINT" {DOWN} {6 SPACES} 
{RVS}{YEL}PRESS (6) TO S 
CRATCH FILES." 
PRINT" {DOWN} {6 SPACES} 
{RVS}{CYN}PRESS Fl TO RE 
TURN TO MENU. {DOWN}" 
PRINT"{12 SPACES}BY 
{2 SPACES}RIZWAAN KHAN" 
PRINT" {HOME}{2 DOWN}":FO 
RI=1T019: PRINT" {WHT} 
{4 RIGHT}{+}{31 RIGHT} 
{+}{3 RIGHT}";:NEXT 
PRINT"{4 SPACES}{RVS} 
{33 SPACES} {OFF}"; 
GETAS: IFAS="5"THENIFES (1 
)<>""THENJ=1:GOTO715 


PB 1 


xg 15 


XD 26 


FX 25 


cQ 38 


BD 46 


BB 60 IFAS="1"THEN94G 

HA 62 IFAS="D"THEN98G 

AG 65 IFAS="2"ANDES (3) <>""THEN 
360 

MG 70 IFAS="3"THEN435 

JX 72 IFA L"THEN1696 

AF 75 IFAS="4"THENZES="1":GOTO 


JULY 1992 COMPUTE G-35 


PROGRAMS 


xs 


.G-36 


166 


198 


191 


E95) 
245 


246 
247 


258 


255 


175 
IFAS="6"THEN915 
IFPEEK (56321) =223ANDES (4 
) <>""THENM=1:W=1:Q=8:GOT 
0526 
GoTOS5 
PRINT" {OFF} {CLR} {HOME} 
{3 DOWN}{1¢ SPACES}{PUR} 
{RVS}DEFINE SUBJECT" 
PRINT" {DOWN} {11 SPACES} 
{WHT }1) MATH" 
PRINT" {DOWN}{11 SPACES} 
2) ECONOMICS" 
PRINT" {DOWN} {11 
3) SCIENCE" 
PRINT" {DOWN} {11 
4) HISTORY" 
PRINT" {DOWN} {11 
5) GEOGRAPHY" 
PRINT" {DOWN} {11 
6) ENGLISH" 
PRINT" {DOWN} {11 SPACES} 
J)OTHER{2 SPACES}" 
IFAS="1"THENNS="M 
OTO175 
IFA$="2"THENNS="ECONOMI 
cs":GOTO175 
IFA$="3"THENNS="SCIENCE 
":GOTO175 
IFAS="4"THENNS="HISTORY 
":GOTO175 
IFAS="5"THENNS="GEOGRAP 
HY":GOTO175 
IFAS="6"THENNS="ENGLISH 
":GOTO175 
IFAS$=CHRS (133) THENDBS=" 
"3GOTOS 
IFAS$="{7"THENINPUT"SUBJE 
CT";NS$:GOTO175 
GOTO138 
PRINT" {CLR} {BLU} {RVS} 
{46 SPACES}":IFDBS="1"T 
HENDBS="":GOTO5 
IFZES="1"THENX=X+1:ZES= 
un 
PRINT" {GRN} {HOME} {RVS} 
{SPACE}QUESTION NUMBER" 
X"{YEL}SUBJECT:"NS"" 
PRINT" {WHT } {HOME } 
{2 DOWN}{5 SPACES}ENTER 
QUESTION (@ TO QUIT)" 
{3 SPACES}:POKE53280,2 
IFDB$="1"THENPRINT" 
{YEL}{HOME}{3 DOWN} 
{2 RIGHT}"DAS"": PRINT" 
{HOME}{3 DOWN}"; 
INPUTDS (X) : IFDS (X) ="@"A 
NDDBS$="1"THEN196 


SPACES} 
SPACES} 
SPACES} 


SPACES} 


IFDS (X) ="@"ANDX<>1THENX 
=X-1:ZE$="1":GOTO5 

IFDS$ (X) ="@"ANDX=1THENS 
IFDBS="1"ANDDS (X) <>""TH 


ENDS (X) =LEFTS (D$ (X) ,8@ 
:GOTO845 

IFDS (X) <>""THENDS (X) =LE 
FT$ (D$(X) ,88) :GOTO275 
PRINT" {CLR} {HOME} {BLU} 
{RVS}{48 SPACES}":GOTOL 


COMPUTE JULY 1992 


KD 


HH 


KE 


PR 


275 
276 
280 
285 


296 
335 


346 
366 


396 
395 
406 


465 


416 


415 
430 


431 


435 


449 
445 
459 
526 


525 


536 
535 


549 


545 


85 
PRINT: PRINT" {HOME } 
{13 DOWN} {WHT} {DOWN} 
{4 SPACES}ENTER ANSWER" 
IFDBS$="1"THENPRINT" 
{YEL}{HOME}{15 DOWN} 
{2 RIGHT}"EAS"": PRINT" 
{HOME}{15 DOWN}"; 
INPUTES (X) : IFES (X) ="@"A 
NDDBS="1"THEN275 
IFDBS="1"ANDES (X) <>""TH 
ENES (X) =LEFTS (E$(X) ,8@) 
:GOTO845 
IFES (X) ="@"THENS 
IFES (X) <>""THENES (X) =LE 
FT$(E$(X) ,80) :X=X+1:GOT 
0175 
GOTO275 
NAMS="": PRINT" {CLR} 
{DOWN} TYPE IN FILE NAM 
E TO SAVE": INPUTNAMS:IF 
NAMS=""THEN5S 
K$="":OPEN7,8,0,NAMS:IN 
PUT#7 ,KS$: IFKS=""THENCLO 
SE7:GOTO485 
CLOSE7:PRINT"{2 DOWN} S 
CRATCHING OLD FILE.":FT 
$="SO:":FTS=FTS+NAMS 
OPEN15,8,15,FT$:CLOSE15 
OPEN7,8,1,NAMS$: PRINT" 
{CLR} {HOME}{6 DOWN} 
{6 SPACES}{WHT}SAVING : 
"NAMS"": PRINT#7,NS: PRI 
NT#7,X 
FORJ=1TOX: PRINT#7,D$(J) 
:=NEXTJ:ZES="1" 
FORJ=1T0X: PRINT#7,ES (J) 
:NEXTJ:CLOSE7 :M=1:FX=9: 
Q=G 
PRINT"{CLR} {HOME} 
{11 DOWN}{6 SPACES}*** 
{SPACE}DATA HAS BEEN SA 
VED ***" 
FORI=1T0200G:NEXTI:GOTO 
526 
PRINT"{CLR} {RVS} {WHT} 
{DOWN} LOAD ERASES ANY 
{SPACE}WORK IN! MEMORY. 
{4 SPACES}ARE YOU SURE 
{SPACE} (Y/N) " 
GETAS: IFAS="N"THENS 
IFAS="Y"THEN100G 
GOTO44G 
ZX=X: PRINT" {CLR} {HOME} 
{SPACE} SCORE={RVS}"Q" 
{OFF} {4 SPACES}QUESTION 
NUMBER={RVS}"W"{OFF}" 
PRINT"TOTAL NUMBER OF Q 
UESTIONS="X"": POKE53280 
7 6:POKE53281,6 
PRINT" {YEL} {RVS} 
{40 SPACES}"; 
PRINT"{UP}{3 SPACES} 
{RVS}SUBJECT : "NS"" 
PRINT" {WHT } QUESTION: 
{GRN} {RVS}"DS (M) "{OFF} 
{DOWN}";FS 
Y=INT (4*RND(1)) +1 


RA 


BR 


GP 


558 


555 
556 
566 
562 


565 
567 


568 


576 
571 


S572 


575 
576 


577 


586 
581 


582 


585 
599 


595 


660 


665 
619 


615 
628 


625 


636 


T=INT ( (X+1-1) *RND(1)) +1 
:U=INT ((X+1-1)*RND(1))+ 
1:V=INT ((X+1-1) *RND (1) 
+1 

IFES (M) =E$ (T) ORES (M) =ES 
(U) ORES (U) =ES$ (T) THEN55& 
IFES (V) =ES (M) ORES (V) =E$ 
(T) ORES (V) =E$ (U) THEN55@ 
IFY=1THENS75 
IFY=3THEN5S70 
IFY=2THEN5S8@ 
PRINT"{RVS}{WHT}A {8}"E 
$(T)"{DOWN}": PRINT" 
{RVS}{WHT}B {8}"ES(U)" 
{DOWN}": PRINT" {RVS} 
{WHT}C {8}"ES(V)"{DOWN} 
" 


PRINT"{RVS}{WHT}D {8}"E 
$(M) "{DOWN}":LS="D":GoOT 
0585 
PRINT"{RVS}{WHT}A {8}"E 
$(T)"{DOWN}" 
PRINT"{RVS}{WHT}B {8}"E 
$(U)"{DOWN}" 
PRINT"{RVS}{WHT}C {8}"E 
$(M) "{DOWN}":LS="C": PRI 
NT"{RVS}{WHT}D {8}"ES(V 
)"{DOWN}":GOTO585 
PRINT" {WHT} {RVS}A {8}"E 
$(M)"{DOWN}" 
PRINT"{RVS}{WHT}B {8}"E 
$(T)"{Down}" 
PRINT"{RVS}{WHT}C {8}"E 
$(U) "{DOWN}":LS="A": PRI 
NT"{RVS}{WHT}D {8}"ES(V 
)"{DOWN}":GOTO585 
PRINT" {WHT}{RVS}A {8}"E 
$(U)"{DOWN}" 
PRINT" {RVS}{WHT}B {8}"E 
$(M) "{DOWN}" 
PRINT"{RVS}{WHT}C {8}"E 
$(T)"{DOWN}":LS="B": PRI 
NT"{RVS}{WHT}D {8}"ES(V 
)"{DOWN}":GOTO585 
GETAS$: IFAS=""THEN585 
IFAS=CHRS (133) THENFX=6: 
Q=8:GOTO5 
IFAS<>"A"ANDAS<>"B"ANDA 
$<>"C"ANDAS<>"D"THEN5S85 
IFAS=LSTHENQ=Q+1: PRINT" 
{WHT}{2 SPACES}{RVS}COR 
RECT! 1"; :FORJ=1T0500:NE 
XTJ:GOTO616 
GOTO655 
M=M+1: LEW=ZXTHENAD=FX-1 
:FX=G:GOTO886 
W=W+1:GOT0520 
PRINT" {CLR} {HOME} 
{2 DOWN} {OFF}{WHT} You 
{SPACE} SCORED{WHT} {RVS} 
"Q"{OFF}OUT OF{WHT} 
{RVS}"X"{OFF} QUESTIONS 
":POKE53281,3 
IFX/2<=QTHENPRINT" 
{2 DOWN}{2 SPACES}{RVS} 
YOU PASSED!":GOT0632 
PRINT" {DOWN} {RVS} SHAME 
ON YOU, YOU FAILED!!!" 


HR 


HF 


DS 
GP 


KS 
EP 


FD 


ES 


BE 


AH 


JX 


RG 


EB 


JH 
HR 


BF 


632 
635 


646 
645 


658 
655 


660 


665 


676 


675 


686 


685 


696 


691 
715 


726 


725 


736 
735 


746 


741 
743 
745 
758 
755 
766 
765 


776 
775 


PRINT" {DOWN} {RVS}PRESS 
‘Pl' TO EXIT." 
PRINT" {DOWN} {RVS} PRESS 
{SPACE}COMMODORE KEY TO 
DO THE TEST AGAIN":GOT 
0646 
GETA$: IFAS=CHRS (133) THE 
N5 
IFPEEK (56321) =223THENM= 
1:W=1:Q=0:GOT0520 
GOTO64B 
PRINT" {RVS} INCORRECT! 
{OFF} THE ANSWER IS":FS$ 
(FX) =D$ (M) :FX=FX+1:FS$ (F 
X) SES (M) :FX=FX+1 
IFY=1THENPRINT"{RVS}A 
{OFF} "ES (M)"";F$:GOT067 
5 
IFY=2THENPRINT"{RVS}B 
{OFF} "ES (M)"";F$:GOT067 
5 


PRINT"{RVS}C {OFF}"ES$(M 
)"";F$:GOTO675 
FORJ=1T02: POKE54276,0:P 
OKE54277,@:POKE54272,0: 
POKE54296,15 
POKE54277,129: POKE54276 
123 
POKE54273,137:POKE54272 
,43:NEXTJ:FORI=1T01500: 
NEXTI:GOTO610 
POKE1024,82:POKE1625,65 
:POKE1626,75:POKE1027,7 
2: POKE1028,65:POKE1029, 
78 

GOTO585 
PRINT" { YEL} {CLR} {HOME} 
{RVS}{11 SPACES}CORRECT 
ION MODE{14 SPACES}"; 
PRINT" {RVS}{WHT} TOTAL 
QUESTIONS ENTERED="Xx"" 
:POKE53281,6: POKE53280, 
2 

PRINT" {RVS}{CYN}QUESTI 
ON NO."J"{GRN}SUBJECT:" 
NS"{DOWN}" 

PRINT" { YEL} {RVS}QUESTIO 
N:{8}"DS (J) "": PRINT 
PRINT" { YEL} {RVS} ANSWER: 
{8}>"ES(s)"" 

PRINT" {DOWN} {RVS}{YEL} 
PRESS'<>'TO FLIP THROUG 
H ENTRIES." 

PRINT" {RVS}{WHT}PRESS' 
RETURN'FOR CORRECTION." 
PRINT" {RVS}{WHT}PRESS' 
R'TO RENAME SUBJECT." 
GETAS: IFAS=CHRS$ (13) THEN 
VB=X:X=J:DB$="1":GOTO78 
8 

IFAS=", "THEN782 
IFAS=CHRS (133) THENDBS=" 
":GOTO775 
IFAS="R"THENAS="""; DBS=" 
1":GOTO95 
IFAS=","THEN785 

GOTO745 
IFVB>OTHENX=VB:GOTOS 


sD 


XK 


EE 


PM 


cs 


FP 


XE 


788 
782 


783 
785 
786 
788 
796 
795 
868 


805 


815 
826 
825 
838 
836 


846 
845 


850 
855 
869 
865 


876 


875 


886 
885 


896 


895 


900 


965 
916 
915 


926 


GoTOS 
IFJ=XTHENJ=1:GOTO715 
J=J+1:GOTO715 
IFJ=1THENJ=X:GOTO715 
J=J-1:GOTO715 
PRINT" {DOWN} {6}{RVS}PL 
EASE SELECT -~ 
{3 SPACES}" 

PRINT" {RVS}(1) ALTER Q 
UESTION." 

PRINT" {RVS}(2) ALTER A 
NSWER.{2 SPACES}™ 
PRINT" {RVS}(3) ALTER B 
OTH.{4 SPACES}" 

PRINT" {RVS}(4) DELETE 
{SPACE}BOTH.{3 SPACES}" 
: DAS=DS (X) : EAS=ES (X) 
GETAS: I1FA$="1"THENS=1:P 
RINT" {CLR}":GOTO196 
IFAS="2"THENS=2: PRINT" 
{CLR}":GOTO275 
IFAS="3"THENS=3: PRINT" 
{CLR}":GOTO196 
IFAS="4"THENMK=VB-J: DBS 
="":GoTO86G 
IFAS$=CHRS (133) THENDBS=" 
":X=VB:GOTO5 
GOTO815 
IFS=10RS=2THENX=VB: DBS= 
"":GOTO5 
IFS=3THENS=S+1:GOT0275 
X=VB:DB$="":GOTO5 
IFJ=1ANDES (J+1) =""THENR 
UN 
IFES (J+1)=""THEND$(J)=" 
"3ES (J) ="":VB=VB-1:X=VB 
:GOTO5 
PRINT" {2 DOWN} 

{2 SPACES} {WHT} DELETING 
+..." 2FORI=1TOMK:AD$=D$ 
(J+1) :AVS=ES$ (J+1) 

DS$ (J) =ADS:E$ (J) =AVS$:J=J 
+1:NEXTI:VB=VB-1:X=VB:E 
$(J)=""sD$ (J)="":GOTOS 
IFFS (FX) =""THEN620 
PRINT" {CLR} {OFF} {HOME} 
{2 DOWN} {BLK}THE ONES 
{SPACE}YOU GOT WRONG AR 
E-{DOWN}":POKE53281,1 
PRINT" {RED}QUESTION - 
{SPACE} "FS$ (FX) "";FS:FS ( 
FX) =""3PX=FX+1 
PRINT" ANSWER - "FS (FX) 
""SPS:FS (EX) ="":PRINT" 
{2 DOWN} {RVS}{CYN}PRES 
S RETURN" 

GETAS: IFA$<>CHRS (13) THE 
N9GG 
IFAD=FXTHENFX=@: GOT0620 
FX=FX+1:GOTO886 
PRINT" {CLR} {DOWN} NAME 
{SPACE}OF FILE TO SCRAT 

CH": INPUTFRS$: IFFRS=""TH 

ENS 
PRINT" {DOWN} INSERT DIS 
K CONTAINING FILE AND P 
RESS{3 SPACES} {RVS}RETU 
RN" 


PQ 
AE 


RS 


XX 


MH 


EK 
EK 


BR 


HB 


gc 


925 
936 
935 


946 


945 
956 
955 
966 
965 


979 


980 


982 


985 


986 


987 
988 


996 


992 


993 
995 


997 


GETAS:IFAS$<>CHRS$ (13) THE 
N925 
PTS="SO:":FTS=FTS+FRS:0 
PEN15,8,15,ET$:CLOSE15 
PRINT"{2 DOWN} 
{2 SPACES}{RVS}{WHT}FIL 
E HAS BEEN SCRATCHED":F 
ORI=1T03000:NEXTI:GOTOS 
PRINT" {CLR} {DOWN} {WHT} 
{SPACE}{RVS}MAKING NEW 
{SPACE}ENTRIES WILL ERA 
SE ANY OLD{OFF} 
{3 SPACES} {RVS}ENTRIES 
{SPACE}IN MEMORY" 
PRINT" {RVS}{WHT}ARE YO 
U SURE (Y¥/N)" 
GETAS$: IFAS="N"THENS 
IFAS="Y"THEN965 
GOTO958 
CLR: DIMD$ (500) :DIMES (56 
6) :X=1:GOTO95 
PRINT" {DOWN} {2 SPACES} 
{RVS}FILE NOT FOUND":OP 
EN15,8,15,"UJ":FORI=1T0 
2008:NEXTI:CLOSE15:RUN 
I=1: PRINT" {WHT} {CLR}":0 
PEN2,8,0,"S":GET#2,AS:G 
ET#2,AS 
IFI=22THENI=1:GOT0992 
GET#2,L$:GET#2,L$:1FST= 
64THENCLOSE2:GOTO992 
GET#2,LB$:GET#2,HB$:LN= 
ASC (LBS+CHR$ (G))+256*AS 
C (HBS+CHRS (8) ) 
PRINT LN; 
GET#2,AS: IFA$=""THENI=1 
+1: PRINTCHRS (13) ;:GOTO9 
82 
PRINTAS; :GOTO988 
PRINT" {DOWN} {RVS}PRESS 
ANY KEY" 
GETAS: IFAS=""THEN993 
IFST<>64THENPRINT" {CLR} 
";GOT0985 
GOTO5 


1068 CLR:DIMD$ (2G) :DIMES (2 


1965 


1667 
1668 


1609 


1616 


1612 


GG) :DIMFS (400) : PRINTCH 
RS (8) : PRINTCHRS (14) 
PRINT"{CLR} {RVS} {WHT} 
TYPE IN FILENAME TO LO 
AD": INPUTNAMS: IFNAMS=" 
"THENRUN 
NS="":0PEN7,8,@,NAMS$:I 
NPUT#7,NS 

INPUT#7,X: IFNS=""THENC 
LOSE7:GOTO97@ 

PRINT" {CLR} {HOME} 

{5 DOWN}{4 SPACES}LOAD 
ING : {RVS}"NAMS"" 
FORJ=1TOX: INPUT#7,DS (J 
) :NEXTJ:ZES="1" 
FORJ=1TOX: INPUT#7 ,ES (J 
) :NEXTJ:CLOSE7:M=1:FX= 
G:Q=0:W=1:GOTO526 


Rizwaan Ahmed Khan lives’ in 
Taihape, New Zealand. a 
JULY 1992 COMPUTE  G-37 


MLX 


Machine Language Entry Program 


MLX for Commodore 64 
Ottis R. Cowper 


Type in and save some copies of 
MLX—you'll want to use it to enter fu- 
ture ML programs from Gazette. When 
you're ready to enter an ML program, 
load and run MLX. It asks you for a start- 
ing address and an ending address. 
These addresses appear in the article 
accompanying the MLX-format pro- 
gram listing you're typing. 

If you're unfamiliar with machine lan- 
guage, the addresses (and all other val- 
ues you enter in MLX) may appear 
strange. Instead of the usual decimal 
numbers you're accustomed to, these 
numbers are in hexadecimat—a base 
16 numbering system commonly used 
by ML programmers. Hexadecimal— 
hex for short—includes the numerals O- 
9 and the letters A-F. But even if you 
know nothing about ML or hex, you 
should have no trouble using MLX. 

After you've entered the starting and 
ending addresses, you'll be offered the 
option of clearing the workspace. 
Choose this option if you're starting to 
enter a new listing. If you're continuing 
a listing that's partially typed from a pre- 
vious session, don't choose this option. 
A functions menu will appear. The first 
option in the menu is Enter Data. If 
you're just starting to type in a pro- 
gram, pick this. Press the E key and 
type the first number in the first line of 
the program listing. If you've already 
typed in part of a program, type the 
line number where you stopped typing 
at the end of the previous session (be 
sure to load the partially completed pro- 
gram before you resume entry). In any 
case, make sure the address you en- 
ter corresponds to the address of a 
line in the listing you are entering. Oth- 
erwise, you'll be unable to enter the da- 
ta correctly. If you pressed E by mis- 
take, you can return to the command 
menu by pressing Return alone when 
asked for the address. (You can get 
back to the menu from most options in 
the program by pressing Return with 
no other input.) 


Entering a Listing 

Once you're in Enter mode, MLX 
prints the address for each program 
line for you. You then type in all nine 
numbers on that line, beginning with 
the first two-digit number after the co- 
lon (:). Each line represents eight data 
bytes and a checksum. Although an 


G-38 COMPUTE JULY 1992 


MLX-format listing appears similar to 
the “hex dump” listings from a ma- 
chine language monitor program, the 
extra checksum number on the end al- 
lows MLX to check your typing. 

When you enter a line, MLX recalcu- 
lates the checksum from the eight 
bytes and the address and compares 
this value to the number from the ninth 
column. If the values match, you'll 
hear a bell tone, the data will be add- 
ed to the workspace area, and the 
prompt for the next line of data will ap- 
pear. But if MLX detects a typing error, 
you'll hear a low buzz and see an er- 
ror message. The line will then be re- 
displayed for editing. 


Invalid Characters Banned 

Only a few keys are active while you're 
entering data, so you may have to un- 
learn some habits. You do not type 
spaces between the columns; MLX au- 
tomatically inserts these for you. You 
do not press Return after typing the 
last number in a line; MLX automatical- 
ly enters and checks the line after you 
type the last digit. 


64 MLX Keypad 


Only the numerals 0-9 and the letters 
A-F can be entered. If you press any 
other key (with some exceptions noted 
below), you'll hear a warning buzz. To 
simplify typing, a numeric keypad func- 
tion is included. The keypad is active 
only while entering data. Addresses 
must be entered with the normal letter 
and number keys. The figure below 
shows the keypad configuration. 

MLX checks for transposed charac- 
ters. If you're supposed to type in AO 


and instead enter OA, MLX will catch 
your mistake. There is one error that 
can slip past MLX: Because of the 
checksum formula used, MLX won't no- 
tice if you accidentally type FF in 
place of 00, and vice versa. And 
there's a very slim chance that you 
could garble a line and still end up 
with a combination of characters that 
adds up to the proper checksum. How- 
ever, these mistakes should not occur 
if you take care while entering data. 


Editing Features 

To correct typing mistakes before fin- 
ishing a line, use the Inst/Del key to de- 
lete the character to the left of the cur- 
sor. If you mess up a line badly, press 
Clr/Home to start the line over. The Re- 
turn key is also active, but only before 
any data is typed on a line. Pressing Re- 
turn at this point returns you to the com- 
mand menu. After you type a charac- 
ter, MLX disables Return until the cur- 
sor returns to the start of a line. Remem- 
ber, press Clr/Home to quickly get toa 
line-number prompt. To make correc- 
tions in a line that MLX has redisplayed 
for editing, compare the line on the 
screen with the one printed in the list- 
ing and then move the cursor to the mis- 
take and type the correct key. The cur- 
sor- left and -right keys provide the 
normal cursor controls. (The Inst/Del 
key now works as an alternative cursor- 
left key.) You cannot move left beyond 
the first character in the line. If you try 
to move beyond the rightmost charac- 
ter, you'll reenter the line. During edit- 
ing, Return is active; pressing it tells 
MLX to recheck the line. You can 
press the Clr/Home key to clear the en- 
tire line if you want to start from 
scratch or if you want to get to a line- 
number prompt to use Return to get 
back to the menu. 


Display Data 

The second menu choice, Display Da- 
ta, examines memory and shows the 
contents in the same format as the pro- 
gram listing (including the checksum). 
When you press D, MLX asks you for a 
starting address. Be sure that the start- 
ing address you give corresponds to a 
line number in the listing. Otherwise, 
the checksum display will be meaning- 
less. MLX displays program lines until 
it reaches the end of the program, at 


which point the menu is redisplayed. 
You can pause the display by pressing 
the space bar. (MLX finishes printing 
the current line before halting.) Press 
the space bar again to restart the dis- 
play. To break out of the display and 
get back to the menu before the end- 
ing address is reached, press Return. 


Other Menu Options 

Two more menu selections let you 
save programs and load them back in- 
to the computer. These are Save File 
and Load File. When you press S or L, 
MLX asks you for the filename. You'll 
then be asked to press either D or T to 
select disk or tape. 

You'll notice the disk drive starting 
and stopping several times during a 
load or save. This is normal behavior. 
MLX opens and reads from or writes to 
the file instead of using the usual 
LOAD and SAVE commands. Also 
note that the drive prefix 0; is added to 
the filename (line 750), so this should 
not be included when entering the 
name. This also precludes the use of 
@ for save-with-replace, so be sure to 
give each version saved a different 
name. 

Remember that MLX saves the en- 
tire workspace area from the starting ad- 
dress to the ending address, so the 
save or load may take longer than you 
might expect if you've entered only a 
small amount of data from a long list- 
ing. When you're saving a partially com- 
pleted listing, make sure to note the ad- 
dress where you stopped typing. 

MLX reports the standard disk or 
tape error messages if any problems 
are detected during the save or load. 
It also has three special load error mes- 
sages: INCORRECT STARTING AD- 
DRESS, which means the file you're try- 
ing to load does not have the starting 
address you specified when you ran 
MLX; LOAD ENDED AT adaress, 
which means the file you're trying to 
load ends before the ending address 
you specified when you started MLX; 
and TRUNCATED AT ENDING AD- 
DRESS, which means the file you're try- 
ing to load extends beyond the ending 
address you specified when you start- 
ed MLX. If you see one of these mes- 
sages and feel certain that you've load- 
ed the right file, exit and rerun MLX, 
being careful to enter the correct start- 


ing and ending addresses. 

The Quit menu option has the obvi- 
ous effect—it stops MLX and enters BA- 
SIC. The Run/Stop key is disabled, so 
the Q option lets you exit the program 
without turning off the computer. (Of 
course, Run/Stop-Restore also gets 
you out.) You'll be asked for verifica- 
tion; press Y to exit to BASIC, or press 
any other key to return to the menu. Af- 
ter quitting, you can type RUN again 
and reenter MLX without losing your da- 
ta, as long as you don't use the Clear 
Workspace option. 


The Finished Product 

When you've finished typing all the da- 
ta for an ML program and saved your 
work, you're ready for the results. Re- 
fer to the corresponding article for 
details on loading and running the 
program. 


An Ounce of Prevention 

Don't take chances—use The Automat- 
ic Proofreader to type the new MLX, 
and then test your copy thoroughly be- 
fore first using it to enter any significant 
amount of data. Make sure all the 
menu options work as they should. En- 
ter fragments of the program starting at 
several different addresses; then use 
the display option to verify that the da- 
ta has been entered correctly. Test the 
save and load options to ensure that 
you can recall your work from disk. 


64 MLX 


SS 10 REM VERSION 1.1: LINES 8 
36,956 MODIFIED, LINES 4 
85-487 ADDED 

100 POKE 56,5@:CLR:DIM INS, 

I,J,A,B,A$,BS$,A(7) ,NS 

C4=48:C6=16:C7=7:22=2:2 

4=254:25=255:26=256:27= 

127 

FA=PEEK (45) +Z6*PEEK (46) 

:BS=PEEK (55) +Z6*PEEK (56 

) :H$="6123456789ABCDEF" 

RS=CHRS (13) :L$="{LEFT}" 

:S$="_":DS=CHRS$ (26) :ZS$= 

CHRS (G6) :TS="{13 RIGHT}" 

SD=54272:FOR I=SD TO SD 

+23:POKE I,0:NEXT:POKE 

{SPACE}SD+24,15:POKE 78 

8,52 

PRINT" {CLR} "CHRS (142) CH 

R$(8):POKE 53280,15:POK 

E 53281,15 

PRINT TS" {RED}{RVS} 

{2 SPACES}{8 @} 


EK 


DM 116 


CJ 126 
SB 136 


cQ 146 


FC 158 


EJ 166 


FR 


JB 


GF 


KR 


PG 


DR 


BD 


RR 


BE 


176 


189 


196 


268 


210 


226 


238 


246 


256 
260 


276 


280 


296 


306 


316 


326 


336 


346 
359 


368 


376 


{2 SPACES}"SPC(28)" 
{2 SPACES}{OFF}{BLU} ML 
X II {RED} {RVS} 
{2 SPACES}"Spc(28)" 
{12 SPACES}{BLU}" 
PRINT" {3 DOWN} 
{3 SPACES}COMPUTE!'S MA 
CHINE LANGUAGE EDITOR 
{3 DOWN}" 
PRINT" {BLK}STARTING ADD 
RESS{4}"; : GOSUB360:SA=A 
D:GOSUB1646:1F F THEN18 
6 
PRINT" {BLK}{2 SPACES}EN 
DING ADDRESS{4}"; :GOSUB 
300:EA=AD:GOSUB1030:1F 
{SPACE}F THEN190 
INPUT"{3 DOWN} {BLK}CLEA 
R WORKSPACE [Y/N] {4}";A 
$:1F LEFT$(AS,1)<>"¥"TH 
EN220 
PRINT"{2 DOWN} {BLU}WORK 
ING...";:FORI=BS TO BS+ 
EA-SA+7:POKE I,@:NEXT:P 
RINT"DONE" 
PRINTTAB(16)"{2 DOWN} 
{BLK}{RVS} MLX COMMAND 
{SPACE}MENU {DOWN}{4}": 
PRINT TS"{RVS}E{OFF}NTE 
R DATA" 
PRINT TS"{RVS}D{OFF}ISP 
LAY DATA":PRINT TS" 
{RVS}L{OFF}OAD FILE" 
PRINT TS"{RVS}S{OFF}AVE 
FILE":PRINT TS"{RVS}Q 
{OFF}UIT{2 DOWN} {BLK}" 
GET AS:IF AS=NS$ THEN256 
A=@:FOR I=1 TO 5:IF AS= 
MIDS ("EDLSQ",1I,1)THEN A 
=I:I=5 
NEXT:ON A GOTO420,610,6 
96,704, 280:GOSUB1066:GO 
T0250 
PRINT" {RVS} QUIT ":INPU 
T"{DOWN}{4}ARE YOU SURE 
[Y/N] ";AS:IF LEFTS(AS, 
1) <>"Y"THEN226 
POKE SD+24,9:END 
INS=N$:AD=G: INPUTINS: IF 
LEN (INS) <>4THENRETURN 
BS=IN$:GOSUB329:AD=A:BS 
=MIDS (INS,3) :GOSUB329:A 
D=AD*256+A: RETURN 
A=G:FOR J=1 TO 2:A$=MID 
$(B$,J,1) :B=ASC (A$) -C4+ 
(AS>"@") *C7:A=A*C6+B 
IF B<@ OR B>15 THEN AD= 
@:A=-1:J=2 
NEXT: RETURN 
B=INT(A/C6):PRINT MIDS ( 
H$,B+1,1) ; :B=A-B*C6: PRI 
NT MID$(HS$,B+1,1);:RETU 
RN 
A=INT (AD/Z6) :GOSUB35@:A 
=AD~A*Z6:GOSUB35G: PRINT 
nents 


era 
CK=INT (AD/Z6) :CK=AD-24* 
CK+Z5* (CK>Z7) :GOTO399 


JULY 1992 COMPUTE G-39 


PROGRAMS 


Gc 
HA 
HD 
FK 


GS 


FX 


CM 


MP 


KC 


MX 


GK 


HG 


Qs 


PM 


ac 


PK 


HJ 


QQ 


GQ 
G-40 


386 
396 
496 


416 
426 


436 
446 


450 


460 


476 


486 


485 


486 


487 


496 


566 


516 


526 


536 


548 


556 


568 


578 


586 


599 


606 


CK=CK*Z2+Z5* (CK>Z7) +A 
CK=CK+Z5* (CK>Z5) : RETURN 
PRINT" {DOWN}STARTING AT 
{4}";:GOSUB39@:1F INS<> 
N$ THEN GOSUB1930:IF F 
{SPACE} THEN4G6 
RETURN 
PRINT" {RVS} ENTER DATA 
{SPACE}":GOSUB46G:IF IN 
S=N$ THEN22G 
OPEN3,3:PRINT 
POKE198,@:GOSUB36G:IF F 
THEN PRINT INS:PRINT" 
{uP}{5 RIGHT}"; 
FOR I=@ TO 24 STEP 3:BS 
=SS$:FOR J=l1 TO 2:IF FT 
HEN BS=MIDS(INS$,I+J,1) 
PRINT" {RVS}"BSLS;:IF I< 
24THEN PRINT" {OFF}"; 
GET AS:IF AS=N$ THEN476 
IF (AS>"/"ANDAS<":")OR(A 
$>"@"ANDAS<"G") THENS46 
MM) -2* (AS=",") ~ 
é )-4* (AS="/") -5 
* (AS="5") ~6* (AS="K") 
A=A-7* (AS="L") -8* (AS=": 
") -9* (AS="U") -15* (AS="I 
")~11* (AS="0") -12* (AS=" 
Pp") 
A=A-~13* (AS=S$):IF A THE 
N AS=MIDS$("ABCD123E456F 
6",A,1):GOTO 546 
IF AS=R$ AND ((1I=G6)AND(J 
=1)OR F)THEN PRINT BS;: 
J=2:NEXT:1=24:GOTO55@ 
IF AS="{HOME}" THEN PRI 
NT B$:J=2:NEXT:1=24:NEX 
T:F=6:GOT044G 
IF (AS="{RIGHT}")ANDF TH 
ENPRINT BSL$;:GOTO54G 
IF AS<>L$ AND AS<>DS$ OR 
((1=6) AND (J=1)) THEN GOS 
UB1068:GOTO47@ 
AS=LS$+S$+L$:PRINT BSLS; 
:J=2-J:IF J THEN PRINT 
{SPACE}L$; :1=1-3 
PRINT A$;:NEXT J:PRINT 
{SPACE}SS$; 
NEXT I:PRINT: PRINT" {UP} 
{5 RIGHT}";:INPUT#3,INS 
:IF INS=N$ THEN CLOSE3: 
GOTO226 
FOR I=1 TO 25 STEP3:BS$= 
MID$(IN$,1I) :GOSUB320:IF 
1<25 THEN GOSUB386:A(I 
/3)=A 
NEXT:IF A<>CK THEN GOSU 
B1660: PRINT" {BLK} {RVS} 
{SPACE}ERROR: REENTER L 
INE ¢4}":F=1:GOTO44G 
GOSUB108@:B=BS+AD-SA:FO 
R I= TO 7:POKE B+I,A(I 
) NEXT 
AD=AD+8:IF AD>EA THEN C 
LOSE3: PRINT" {DOWN} {BLU} 
** END OF ENTRY **{BLK} 
{2 DOWN}":GOTO7GB 
F=6:GOTO44G 


COMPUTE JULY 1992 


QA 


RJ 


KS 


PR 
FP 
HQ 


HH 


SQ 
FJ 


PE 


FC 


GS 


MA 


GE 


RX 


FA 
FQ 


SA 


618 


626 


639 


648 


658 


666 
676 
686 
695 
766 


716 


726 


736 


746 


756 


766 


776 


780 


790 


860 


816 


826 


836 


846 
850 


868 


PRINT" {CLR} {DOWN} {RVS} 
{SPACE}DISPLAY DATA ":G 
OSUB406:IF INS=NS$ THEN2 
26 
PRINT" {DOWN} {BLU}PRESS: 
{RVS}SPACE{OFF} TO PAU 
SE, {RVS}RETURN{OFF} TO 
BREAK{4}{DOWN}" 
GOSUB369:B=BS+AD-SA:FOR 
I=BTO B+7:A=PEEK(I) :GOS 
UB35G:GOSUB389:PRINT S$ 


; 
NEXT: PRINT" {RVS}"; :A=CK 
:GOSUB350: PRINT 
F=1:AD=AD+8:IF AD>EA TH 
ENPRINT" {DOWN} {BLU}** E 
ND OF DATA **":GOTO22G 
GET AS$:IF AS=RS THEN GO 
SUB1684:GOTO229 
IF A$=S$ THEN F=F+1:GOS 
UB108¢ 
ONFGOT0636,666,638 
PRINT" {DOWN} {RVS} LOAD 
{SPACE}DATA ":OP=1:GOTO 
716 
PRINT" {DOWN} {RVS} SAVE 
{SPACE}FILE ":0P=G 
INS=NS:INPUT" {DOWN} FILE 
NAME{4}";INS:IF INS=NS 
{SPACE }THEN226 
F=9: PRINT" {DOWN} {BLK} 
{RVS}T{OFF}APE OR {RVS} 
D{OFF}ISK: {4}"; 
GET AS:IF AS="T"THEN PR 
INT"T {DOWN}":GOTO88G 
IF A$<>"D"THEN730 
PRINT"D{DOWN}":OPEN15,8 
,15,"I6:":B=EA-SA:INS=" 
O:"+INS$:IF OP THEN816 
OPEN 1,8,8,INS+",P,W":G 
OSUB86G:IF A THEN226 
AH=INT (SA/256) :AL=SA~(A 
H*256) :PRINT#1,CHRS$ (AL) 
;CHRS (AH) ; 
FOR I=@ TO B:PRINT#1,CH 
RS (PEEK(BS+I));:IF ST T 
HEN8GG 
NEXT:CLOSE1:CLOSE15:GOT 
0946 
GOSUB106G: PRINT" {DOWN} 
{BLK}ERROR DURING SAVE: 
£4}":GOSUB866:GOTO228 
OPEN 1,8,8,INS+",P,R":G 
OSUB86G:IF A THEN226 
GET#1,A$,B$:AD=ASC (AS+Z 
$)+256*ASC(BS$+Z$):IF AD 
<>SA THEN F=1:GOTO85@ 
FOR I=0 TO B:GET#1,A$:P 
OKE BS+I,ASC(AS$+Z$) : IF ( 
I<>B)AND ST THEN F=2:AD 
=I:I=B 
NEXT: IF ST<>64 THEN F=3 
CLOSE1:CLOSE15:0N ABS (F 
>6)+1 GOTO96G,979 
INPUT#15,A,AS$:IF A THEN 
CLOSE1:CLOSE15:GOSUB1@ 
6G:PRINT"{RVS}ERROR: "A 
$ 


GQ 
EJ 


HJ 


cs 


sc 


KM 


JF 


AE 


XP 


FR 


DP 


PP 


GR 


FD 


RX 


FF 


FX 


CR 


HC 


AR 


DX 


PE 


AC 


876 
886 


896 


998 


916 


926 


936 


949 


9568 


966 


978 


986 


996 


1669 


1616 


1626 


1636 


16498 


1656 


1966 


1076 


1686 


1696 


RETURN 

POKE183, PEEK (FA+2) : POKE 
187, PEEK (FA+3) :POKE188, 
PEEK (FA+4) : IFOP=@THEN92 


g 
SYS 63466:1F (PEEK(783)A 
ND1)THEN GOSUB1066: PRIN 
T"{DOWN}{RVS} FILE NOT 
{SPACE}FOUND ":GOTO696 
AD=PEEK (829) +256*PEEK (8 
36):IF AD<>SA THEN F=1: 
GOTO978 
A=PEEK (831) +256*PEEK (83 
2) -1:F=F-2* (A<EA) ~3* (A> 
EA) :AD=A-AD:GOT0930 
A=SA:B=EA+1:GOSUB1G10:P 
OKE78@,3:SYS 63338 
A=BS:B=BS+(EA-SA) +1:GOS 
UB1G19:0N OP GOTO95G:SY 
S 63591 
GOSUB1G8G: PRINT" {BLU}** 
SAVE COMPLETED **":GOT 
0226 
POKE147,@:SYS 63562:IF 
{SPACE}ST>@ THEN97@ 
GOSUB1684: PRINT" {BLU}** 
LOAD COMPLETED **":GOT 
0226 
GOSUB196G: PRINT" {BLK} 
{RVS}ERROR DURING LOAD: 
{DOWN}{4}":ON F GOSUB98 
6,99G,1808:GOTO226 
PRINT" INCORRECT STARTIN 
G ADDRESS (";:GOSUB360: 
PRINT") ": RETURN 
PRINT"LOAD ENDED AT ";: 
AD=SA+AD:GOSUB36G: PRINT 
D$: RETURN 
PRINT"TRUNCATED AT END 
ING ADDRESS":RETURN 
AH=INT (A/256) :AL=A-~(AH 
*256) : POKE193,AL: POKEL 
94,AH 
AH=INT (B/256) :AL=B~ (AH 
*256) : POKE174,AL: POKE] 
75,AH:RETURN 
IF AD<SA OR AD>EA THEN 
1656 
IF (AD>511 AND AD<6528 
6) THEN GOSUB1686: F=0 
: RETURN 
GOSUB1G6G: PRINT" {RVS} 
{SPACE}INVALID ADDRESS 
{DOWN} {BLK}":F=1:RETU 
RN 
POKE SD+5,31:POKE SD+6 
,208:POKE SD,240:POKE 
{SPACE}SD+1,4:POKE SD+ 
4,33 
FOR S=1 TO 160:NEXT:GO 
T01099 
POKE SD+5,8:POKE SD+6, 
240:POKE SD,@:POKE SD+ 
1,98:POKE SD+4,17 
FOR S=1 TO 100:NEXT:PO 
KE SD+4,0:POKE SD,@:PO 
KE SD+1,%:RETURN 


Oo